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

namespace Rv\Data\LeaveBreadcrumb;

use UnexpectedValueException;

/**
 * Protobuf type <code>rv.data.LeaveBreadcrumb.Type</code>
 */
class Type
{
    /**
     * Generated from protobuf enum <code>Navigation = 0;</code>
     */
    const Navigation = 0;
    /**
     * Generated from protobuf enum <code>Request = 1;</code>
     */
    const Request = 1;
    /**
     * Generated from protobuf enum <code>Process = 2;</code>
     */
    const Process = 2;
    /**
     * Generated from protobuf enum <code>Log = 3;</code>
     */
    const Log = 3;
    /**
     * Generated from protobuf enum <code>User = 4;</code>
     */
    const User = 4;
    /**
     * Generated from protobuf enum <code>State = 5;</code>
     */
    const State = 5;
    /**
     * Generated from protobuf enum <code>Error = 6;</code>
     */
    const Error = 6;
    /**
     * Generated from protobuf enum <code>Manual = 7;</code>
     */
    const Manual = 7;

    private static $valueToName = [
        self::Navigation => 'Navigation',
        self::Request => 'Request',
        self::Process => 'Process',
        self::Log => 'Log',
        self::User => 'User',
        self::State => 'State',
        self::Error => 'Error',
        self::Manual => 'Manual',
    ];

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

