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

namespace Rv\Data\Slide\Element\DataLink\PlaybackMarkerIdentifier;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.data.Slide.Element.DataLink.PlaybackMarkerIdentifier.Type</code>
 */
class Type
{
    /**
     * Generated from protobuf enum <code>PLAYBACK_MARKER_IDENTIFIER_FIRST = 0;</code>
     */
    const PLAYBACK_MARKER_IDENTIFIER_FIRST = 0;
    /**
     * Generated from protobuf enum <code>PLAYBACK_MARKER_IDENTIFIER_PREVIOUS = 1;</code>
     */
    const PLAYBACK_MARKER_IDENTIFIER_PREVIOUS = 1;
    /**
     * Generated from protobuf enum <code>PLAYBACK_MARKER_IDENTIFIER_NEXT = 2;</code>
     */
    const PLAYBACK_MARKER_IDENTIFIER_NEXT = 2;
    /**
     * Generated from protobuf enum <code>PLAYBACK_MARKER_IDENTIFIER_LAST = 3;</code>
     */
    const PLAYBACK_MARKER_IDENTIFIER_LAST = 3;
    /**
     * Generated from protobuf enum <code>PLAYBACK_MARKER_IDENTIFIER_NAME = 4;</code>
     */
    const PLAYBACK_MARKER_IDENTIFIER_NAME = 4;

    private static $valueToName = [
        self::PLAYBACK_MARKER_IDENTIFIER_FIRST => 'PLAYBACK_MARKER_IDENTIFIER_FIRST',
        self::PLAYBACK_MARKER_IDENTIFIER_PREVIOUS => 'PLAYBACK_MARKER_IDENTIFIER_PREVIOUS',
        self::PLAYBACK_MARKER_IDENTIFIER_NEXT => 'PLAYBACK_MARKER_IDENTIFIER_NEXT',
        self::PLAYBACK_MARKER_IDENTIFIER_LAST => 'PLAYBACK_MARKER_IDENTIFIER_LAST',
        self::PLAYBACK_MARKER_IDENTIFIER_NAME => 'PLAYBACK_MARKER_IDENTIFIER_NAME',
    ];

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

