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

namespace Rv\Analytics\Trigger\TestPattern;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.Trigger.TestPattern.TestPatternType</code>
 */
class TestPatternType
{
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC = 0;</code>
     */
    const TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC = 0;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_BLEND_GRID = 1;</code>
     */
    const TEST_PATTERN_TYPE_BLEND_GRID = 1;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_COLOR_BARS = 2;</code>
     */
    const TEST_PATTERN_TYPE_COLOR_BARS = 2;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_CUSTOM_COLORS = 3;</code>
     */
    const TEST_PATTERN_TYPE_CUSTOM_COLORS = 3;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_FOCUS = 4;</code>
     */
    const TEST_PATTERN_TYPE_FOCUS = 4;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_GRAY_SCALE = 5;</code>
     */
    const TEST_PATTERN_TYPE_GRAY_SCALE = 5;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_LINES = 6;</code>
     */
    const TEST_PATTERN_TYPE_LINES = 6;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_LOGO_BOUNCE = 7;</code>
     */
    const TEST_PATTERN_TYPE_LOGO_BOUNCE = 7;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_RADAR = 8;</code>
     */
    const TEST_PATTERN_TYPE_RADAR = 8;
    /**
     * Generated from protobuf enum <code>TEST_PATTERN_TYPE_TEXT = 9;</code>
     */
    const TEST_PATTERN_TYPE_TEXT = 9;

    private static $valueToName = [
        self::TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC => 'TEST_PATTERN_TYPE_AUDIO_VIDEO_SYNC',
        self::TEST_PATTERN_TYPE_BLEND_GRID => 'TEST_PATTERN_TYPE_BLEND_GRID',
        self::TEST_PATTERN_TYPE_COLOR_BARS => 'TEST_PATTERN_TYPE_COLOR_BARS',
        self::TEST_PATTERN_TYPE_CUSTOM_COLORS => 'TEST_PATTERN_TYPE_CUSTOM_COLORS',
        self::TEST_PATTERN_TYPE_FOCUS => 'TEST_PATTERN_TYPE_FOCUS',
        self::TEST_PATTERN_TYPE_GRAY_SCALE => 'TEST_PATTERN_TYPE_GRAY_SCALE',
        self::TEST_PATTERN_TYPE_LINES => 'TEST_PATTERN_TYPE_LINES',
        self::TEST_PATTERN_TYPE_LOGO_BOUNCE => 'TEST_PATTERN_TYPE_LOGO_BOUNCE',
        self::TEST_PATTERN_TYPE_RADAR => 'TEST_PATTERN_TYPE_RADAR',
        self::TEST_PATTERN_TYPE_TEXT => 'TEST_PATTERN_TYPE_TEXT',
    ];

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

