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

namespace Rv\Analytics\Trigger\ActionClear;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.trigger.ActionClear.Type</code>
 */
class Type
{
    /**
     * Generated from protobuf enum <code>UNKNOWN = 0;</code>
     */
    const UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>AUDIO = 1;</code>
     */
    const AUDIO = 1;
    /**
     * Generated from protobuf enum <code>MESSAGES = 2;</code>
     */
    const MESSAGES = 2;
    /**
     * Generated from protobuf enum <code>PROPS = 3;</code>
     */
    const PROPS = 3;
    /**
     * Generated from protobuf enum <code>ANNOUNCEMENTS = 4;</code>
     */
    const ANNOUNCEMENTS = 4;
    /**
     * Generated from protobuf enum <code>SLIDE = 5;</code>
     */
    const SLIDE = 5;
    /**
     * Generated from protobuf enum <code>MEDIA = 6;</code>
     */
    const MEDIA = 6;
    /**
     * Generated from protobuf enum <code>VIDEO_INPUT = 7;</code>
     */
    const VIDEO_INPUT = 7;
    /**
     * Generated from protobuf enum <code>CLEAR_TO_LOGO = 8;</code>
     */
    const CLEAR_TO_LOGO = 8;
    /**
     * Generated from protobuf enum <code>CLEAR_GROUP = 9;</code>
     */
    const CLEAR_GROUP = 9;

    private static $valueToName = [
        self::UNKNOWN => 'UNKNOWN',
        self::AUDIO => 'AUDIO',
        self::MESSAGES => 'MESSAGES',
        self::PROPS => 'PROPS',
        self::ANNOUNCEMENTS => 'ANNOUNCEMENTS',
        self::SLIDE => 'SLIDE',
        self::MEDIA => 'MEDIA',
        self::VIDEO_INPUT => 'VIDEO_INPUT',
        self::CLEAR_TO_LOGO => 'CLEAR_TO_LOGO',
        self::CLEAR_GROUP => 'CLEAR_GROUP',
    ];

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

