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

namespace Rv\Analytics\Ui\BibleLookup;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.analytics.ui.BibleLookup.Location</code>
 */
class Location
{
    /**
     * Generated from protobuf enum <code>LOCATION_UNKNOWN = 0;</code>
     */
    const LOCATION_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>TEXT_REFERENCE = 1;</code>
     */
    const TEXT_REFERENCE = 1;
    /**
     * Generated from protobuf enum <code>MENU_BOOK = 2;</code>
     */
    const MENU_BOOK = 2;
    /**
     * Generated from protobuf enum <code>MENU_CHAPTER = 3;</code>
     */
    const MENU_CHAPTER = 3;
    /**
     * Generated from protobuf enum <code>MENU_VERSE = 4;</code>
     */
    const MENU_VERSE = 4;
    /**
     * Generated from protobuf enum <code>TEXT_SEARCH_CHAPTER = 5;</code>
     */
    const TEXT_SEARCH_CHAPTER = 5;
    /**
     * Generated from protobuf enum <code>TEXT_SEARCH_VERSE = 6;</code>
     */
    const TEXT_SEARCH_VERSE = 6;

    private static $valueToName = [
        self::LOCATION_UNKNOWN => 'LOCATION_UNKNOWN',
        self::TEXT_REFERENCE => 'TEXT_REFERENCE',
        self::MENU_BOOK => 'MENU_BOOK',
        self::MENU_CHAPTER => 'MENU_CHAPTER',
        self::MENU_VERSE => 'MENU_VERSE',
        self::TEXT_SEARCH_CHAPTER => 'TEXT_SEARCH_CHAPTER',
        self::TEXT_SEARCH_VERSE => '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);
    }
}

