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

namespace Rv\Analytics\Trigger\Cue\Slide\ScrollingTextElement;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.Trigger.Cue.Slide.ScrollingTextElement.Speed</code>
 */
class Speed
{
    /**
     * Generated from protobuf enum <code>SPEED_UNKNOWN = 0;</code>
     */
    const SPEED_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>SPEED_VERY_SLOW = 1;</code>
     */
    const SPEED_VERY_SLOW = 1;
    /**
     * Generated from protobuf enum <code>SPEED_SLOW = 2;</code>
     */
    const SPEED_SLOW = 2;
    /**
     * Generated from protobuf enum <code>SPEED_MEDIUM = 3;</code>
     */
    const SPEED_MEDIUM = 3;
    /**
     * Generated from protobuf enum <code>SPEED_FAST = 4;</code>
     */
    const SPEED_FAST = 4;
    /**
     * Generated from protobuf enum <code>SPEED_VERY_FAST = 5;</code>
     */
    const SPEED_VERY_FAST = 5;

    private static $valueToName = [
        self::SPEED_UNKNOWN => 'SPEED_UNKNOWN',
        self::SPEED_VERY_SLOW => 'SPEED_VERY_SLOW',
        self::SPEED_SLOW => 'SPEED_SLOW',
        self::SPEED_MEDIUM => 'SPEED_MEDIUM',
        self::SPEED_FAST => 'SPEED_FAST',
        self::SPEED_VERY_FAST => 'SPEED_VERY_FAST',
    ];

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

