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

namespace Rv\Analytics\UI\MainView\Bible\Lookup;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.UI.MainView.Bible.Lookup.LookupLocation</code>
 */
class LookupLocation
{
    /**
     * Generated from protobuf enum <code>LOOKUP_LOCATION_UNKNOWN = 0;</code>
     */
    const LOOKUP_LOCATION_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>LOOKUP_LOCATION_TEXT_REFERENCE = 1;</code>
     */
    const LOOKUP_LOCATION_TEXT_REFERENCE = 1;
    /**
     * Generated from protobuf enum <code>LOOKUP_LOCATION_MENU_BOOK = 2;</code>
     */
    const LOOKUP_LOCATION_MENU_BOOK = 2;
    /**
     * Generated from protobuf enum <code>LOOKUP_LOCATION_MENU_CHAPTER = 3;</code>
     */
    const LOOKUP_LOCATION_MENU_CHAPTER = 3;
    /**
     * Generated from protobuf enum <code>LOOKUP_LOCATION_MENU_VERSE = 4;</code>
     */
    const LOOKUP_LOCATION_MENU_VERSE = 4;
    /**
     * Generated from protobuf enum <code>LOOKUP_LOCATION_TEXT_SEARCH_CHAPTER = 5;</code>
     */
    const LOOKUP_LOCATION_TEXT_SEARCH_CHAPTER = 5;
    /**
     * Generated from protobuf enum <code>LOOKUP_LOCATION_TEXT_SEARCH_VERSE = 6;</code>
     */
    const LOOKUP_LOCATION_TEXT_SEARCH_VERSE = 6;

    private static $valueToName = [
        self::LOOKUP_LOCATION_UNKNOWN => 'LOOKUP_LOCATION_UNKNOWN',
        self::LOOKUP_LOCATION_TEXT_REFERENCE => 'LOOKUP_LOCATION_TEXT_REFERENCE',
        self::LOOKUP_LOCATION_MENU_BOOK => 'LOOKUP_LOCATION_MENU_BOOK',
        self::LOOKUP_LOCATION_MENU_CHAPTER => 'LOOKUP_LOCATION_MENU_CHAPTER',
        self::LOOKUP_LOCATION_MENU_VERSE => 'LOOKUP_LOCATION_MENU_VERSE',
        self::LOOKUP_LOCATION_TEXT_SEARCH_CHAPTER => 'LOOKUP_LOCATION_TEXT_SEARCH_CHAPTER',
        self::LOOKUP_LOCATION_TEXT_SEARCH_VERSE => 'LOOKUP_LOCATION_TEXT_SEARCH_VERSE',
    ];

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

