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

namespace Rv\Data\Action\ClearType;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.data.Action.ClearType.ClearTargetLayer</code>
 */
class ClearTargetLayer
{
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_ALL = 0;</code>
     */
    const CLEAR_TARGET_LAYER_ALL = 0;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_AUDIO = 1;</code>
     */
    const CLEAR_TARGET_LAYER_AUDIO = 1;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_BACKGROUND = 2;</code>
     */
    const CLEAR_TARGET_LAYER_BACKGROUND = 2;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_LIVE_VIDEO = 3;</code>
     */
    const CLEAR_TARGET_LAYER_LIVE_VIDEO = 3;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_PROP = 4;</code>
     */
    const CLEAR_TARGET_LAYER_PROP = 4;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_SLIDE = 5;</code>
     */
    const CLEAR_TARGET_LAYER_SLIDE = 5;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_LOGO = 6;</code>
     */
    const CLEAR_TARGET_LAYER_LOGO = 6;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_MESSAGES = 7;</code>
     */
    const CLEAR_TARGET_LAYER_MESSAGES = 7;
    /**
     * Generated from protobuf enum <code>CLEAR_TARGET_LAYER_AUDIO_EFFECTS = 8;</code>
     */
    const CLEAR_TARGET_LAYER_AUDIO_EFFECTS = 8;

    private static $valueToName = [
        self::CLEAR_TARGET_LAYER_ALL => 'CLEAR_TARGET_LAYER_ALL',
        self::CLEAR_TARGET_LAYER_AUDIO => 'CLEAR_TARGET_LAYER_AUDIO',
        self::CLEAR_TARGET_LAYER_BACKGROUND => 'CLEAR_TARGET_LAYER_BACKGROUND',
        self::CLEAR_TARGET_LAYER_LIVE_VIDEO => 'CLEAR_TARGET_LAYER_LIVE_VIDEO',
        self::CLEAR_TARGET_LAYER_PROP => 'CLEAR_TARGET_LAYER_PROP',
        self::CLEAR_TARGET_LAYER_SLIDE => 'CLEAR_TARGET_LAYER_SLIDE',
        self::CLEAR_TARGET_LAYER_LOGO => 'CLEAR_TARGET_LAYER_LOGO',
        self::CLEAR_TARGET_LAYER_MESSAGES => 'CLEAR_TARGET_LAYER_MESSAGES',
        self::CLEAR_TARGET_LAYER_AUDIO_EFFECTS => 'CLEAR_TARGET_LAYER_AUDIO_EFFECTS',
    ];

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

