<?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.Pattern</code>
 */
class Pattern
{
    /**
     * Generated from protobuf enum <code>AUDIO_VIDEO_SYNC = 0;</code>
     */
    const AUDIO_VIDEO_SYNC = 0;
    /**
     * Generated from protobuf enum <code>BLEND_GRID = 1;</code>
     */
    const BLEND_GRID = 1;
    /**
     * Generated from protobuf enum <code>COLOR_BARS = 2;</code>
     */
    const COLOR_BARS = 2;
    /**
     * Generated from protobuf enum <code>CUSTOM_COLORS = 3;</code>
     */
    const CUSTOM_COLORS = 3;
    /**
     * Generated from protobuf enum <code>FOCUS = 4;</code>
     */
    const FOCUS = 4;
    /**
     * Generated from protobuf enum <code>GRAY_SCALE = 5;</code>
     */
    const GRAY_SCALE = 5;
    /**
     * Generated from protobuf enum <code>LINES = 6;</code>
     */
    const LINES = 6;
    /**
     * Generated from protobuf enum <code>LOGO_BOUNCE = 7;</code>
     */
    const LOGO_BOUNCE = 7;
    /**
     * Generated from protobuf enum <code>RADAR = 8;</code>
     */
    const RADAR = 8;
    /**
     * Generated from protobuf enum <code>TEXT = 9;</code>
     */
    const TEXT = 9;

    private static $valueToName = [
        self::AUDIO_VIDEO_SYNC => 'AUDIO_VIDEO_SYNC',
        self::BLEND_GRID => 'BLEND_GRID',
        self::COLOR_BARS => 'COLOR_BARS',
        self::CUSTOM_COLORS => 'CUSTOM_COLORS',
        self::FOCUS => 'FOCUS',
        self::GRAY_SCALE => 'GRAY_SCALE',
        self::LINES => 'LINES',
        self::LOGO_BOUNCE => 'LOGO_BOUNCE',
        self::RADAR => 'RADAR',
        self::TEXT => '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);
    }
}

