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

namespace Rv\Data\Layer;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.data.Layer.BlendMode</code>
 */
class BlendMode
{
    /**
     * Generated from protobuf enum <code>BLEND_MODE_NORMAL = 0;</code>
     */
    const BLEND_MODE_NORMAL = 0;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_DISSOLVE = 1;</code>
     */
    const BLEND_MODE_DISSOLVE = 1;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_DARKEN = 2;</code>
     */
    const BLEND_MODE_DARKEN = 2;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_MULTIPLY = 3;</code>
     */
    const BLEND_MODE_MULTIPLY = 3;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_COLOR_BURN = 4;</code>
     */
    const BLEND_MODE_COLOR_BURN = 4;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_LINEAR_BURN = 5;</code>
     */
    const BLEND_MODE_LINEAR_BURN = 5;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_DARKER_COLOR = 6;</code>
     */
    const BLEND_MODE_DARKER_COLOR = 6;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_LIGHTEN = 7;</code>
     */
    const BLEND_MODE_LIGHTEN = 7;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_SCREEN = 8;</code>
     */
    const BLEND_MODE_SCREEN = 8;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_COLOR_DODGE = 9;</code>
     */
    const BLEND_MODE_COLOR_DODGE = 9;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_LINEAR_DODGE = 10;</code>
     */
    const BLEND_MODE_LINEAR_DODGE = 10;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_LIGHTER_COLOR = 11;</code>
     */
    const BLEND_MODE_LIGHTER_COLOR = 11;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_OVERLAY = 12;</code>
     */
    const BLEND_MODE_OVERLAY = 12;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_SOFT_LIGHT = 13;</code>
     */
    const BLEND_MODE_SOFT_LIGHT = 13;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_HARD_LIGHT = 14;</code>
     */
    const BLEND_MODE_HARD_LIGHT = 14;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_VIVID_LIGHT = 15;</code>
     */
    const BLEND_MODE_VIVID_LIGHT = 15;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_LINEAR_LIGHT = 16;</code>
     */
    const BLEND_MODE_LINEAR_LIGHT = 16;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_PIN_LIGHT = 17;</code>
     */
    const BLEND_MODE_PIN_LIGHT = 17;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_HARD_MIX = 18;</code>
     */
    const BLEND_MODE_HARD_MIX = 18;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_DIFFERENCE = 19;</code>
     */
    const BLEND_MODE_DIFFERENCE = 19;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_EXCLUSION = 20;</code>
     */
    const BLEND_MODE_EXCLUSION = 20;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_SUBTRACT = 21;</code>
     */
    const BLEND_MODE_SUBTRACT = 21;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_DIVIDE = 22;</code>
     */
    const BLEND_MODE_DIVIDE = 22;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_HUE = 23;</code>
     */
    const BLEND_MODE_HUE = 23;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_SATURATION = 24;</code>
     */
    const BLEND_MODE_SATURATION = 24;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_COLOR = 25;</code>
     */
    const BLEND_MODE_COLOR = 25;
    /**
     * Generated from protobuf enum <code>BLEND_MODE_LUMINOSITY = 26;</code>
     */
    const BLEND_MODE_LUMINOSITY = 26;

    private static $valueToName = [
        self::BLEND_MODE_NORMAL => 'BLEND_MODE_NORMAL',
        self::BLEND_MODE_DISSOLVE => 'BLEND_MODE_DISSOLVE',
        self::BLEND_MODE_DARKEN => 'BLEND_MODE_DARKEN',
        self::BLEND_MODE_MULTIPLY => 'BLEND_MODE_MULTIPLY',
        self::BLEND_MODE_COLOR_BURN => 'BLEND_MODE_COLOR_BURN',
        self::BLEND_MODE_LINEAR_BURN => 'BLEND_MODE_LINEAR_BURN',
        self::BLEND_MODE_DARKER_COLOR => 'BLEND_MODE_DARKER_COLOR',
        self::BLEND_MODE_LIGHTEN => 'BLEND_MODE_LIGHTEN',
        self::BLEND_MODE_SCREEN => 'BLEND_MODE_SCREEN',
        self::BLEND_MODE_COLOR_DODGE => 'BLEND_MODE_COLOR_DODGE',
        self::BLEND_MODE_LINEAR_DODGE => 'BLEND_MODE_LINEAR_DODGE',
        self::BLEND_MODE_LIGHTER_COLOR => 'BLEND_MODE_LIGHTER_COLOR',
        self::BLEND_MODE_OVERLAY => 'BLEND_MODE_OVERLAY',
        self::BLEND_MODE_SOFT_LIGHT => 'BLEND_MODE_SOFT_LIGHT',
        self::BLEND_MODE_HARD_LIGHT => 'BLEND_MODE_HARD_LIGHT',
        self::BLEND_MODE_VIVID_LIGHT => 'BLEND_MODE_VIVID_LIGHT',
        self::BLEND_MODE_LINEAR_LIGHT => 'BLEND_MODE_LINEAR_LIGHT',
        self::BLEND_MODE_PIN_LIGHT => 'BLEND_MODE_PIN_LIGHT',
        self::BLEND_MODE_HARD_MIX => 'BLEND_MODE_HARD_MIX',
        self::BLEND_MODE_DIFFERENCE => 'BLEND_MODE_DIFFERENCE',
        self::BLEND_MODE_EXCLUSION => 'BLEND_MODE_EXCLUSION',
        self::BLEND_MODE_SUBTRACT => 'BLEND_MODE_SUBTRACT',
        self::BLEND_MODE_DIVIDE => 'BLEND_MODE_DIVIDE',
        self::BLEND_MODE_HUE => 'BLEND_MODE_HUE',
        self::BLEND_MODE_SATURATION => 'BLEND_MODE_SATURATION',
        self::BLEND_MODE_COLOR => 'BLEND_MODE_COLOR',
        self::BLEND_MODE_LUMINOSITY => 'BLEND_MODE_LUMINOSITY',
    ];

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

