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

namespace Rv\Analytics\Trigger\Cue;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.trigger.cue.DestinationLayer</code>
 */
class DestinationLayer
{
    /**
     * Generated from protobuf enum <code>DESTINATION_LAYER_UNKNOWN = 0;</code>
     */
    const DESTINATION_LAYER_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>ANNOUNCEMENT = 1;</code>
     */
    const ANNOUNCEMENT = 1;
    /**
     * Generated from protobuf enum <code>PRESENTATION = 2;</code>
     */
    const PRESENTATION = 2;
    /**
     * Generated from protobuf enum <code>STAGE = 3;</code>
     */
    const STAGE = 3;
    /**
     * Generated from protobuf enum <code>PROPS = 4;</code>
     */
    const PROPS = 4;
    /**
     * Generated from protobuf enum <code>MESSAGES = 5;</code>
     */
    const MESSAGES = 5;
    /**
     * Generated from protobuf enum <code>MASK = 6;</code>
     */
    const MASK = 6;

    private static $valueToName = [
        self::DESTINATION_LAYER_UNKNOWN => 'DESTINATION_LAYER_UNKNOWN',
        self::ANNOUNCEMENT => 'ANNOUNCEMENT',
        self::PRESENTATION => 'PRESENTATION',
        self::STAGE => 'STAGE',
        self::PROPS => 'PROPS',
        self::MESSAGES => 'MESSAGES',
        self::MASK => '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);
    }
}

