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

namespace Rv\Analytics\Trigger\Cue\Slide;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.Trigger.Cue.Slide.DestinationLayer</code>
 */
class DestinationLayer
{
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_UNKNOWN = 0;</code>
     */
    const DESTINATION_LAYER_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_ANNOUNCEMENT = 1;</code>
     */
    const DESTINATION_LAYER_ANNOUNCEMENT = 1;
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_PRESENTATION = 2;</code>
     */
    const DESTINATION_LAYER_PRESENTATION = 2;
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_STAGE = 3;</code>
     */
    const DESTINATION_LAYER_STAGE = 3;
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_PROPS = 4;</code>
     */
    const DESTINATION_LAYER_PROPS = 4;
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_MESSAGES = 5;</code>
     */
    const DESTINATION_LAYER_MESSAGES = 5;
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_MASK = 6;</code>
     */
    const DESTINATION_LAYER_MASK = 6;

    private static $valueToName = [
        self::DESTINATION_LAYER_UNKNOWN => 'DESTINATION_LAYER_UNKNOWN',
        self::DESTINATION_LAYER_ANNOUNCEMENT => 'DESTINATION_LAYER_ANNOUNCEMENT',
        self::DESTINATION_LAYER_PRESENTATION => 'DESTINATION_LAYER_PRESENTATION',
        self::DESTINATION_LAYER_STAGE => 'DESTINATION_LAYER_STAGE',
        self::DESTINATION_LAYER_PROPS => 'DESTINATION_LAYER_PROPS',
        self::DESTINATION_LAYER_MESSAGES => 'DESTINATION_LAYER_MESSAGES',
        self::DESTINATION_LAYER_MASK => 'DESTINATION_LAYER_MASK',
    ];

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

