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

namespace Registration\Core;

use UnexpectedValueException;

/**
 * Protobuf type <code>registration.core.Status</code>
 */
class Status
{
    /**
     * Generated from protobuf enum <code>Success = 0;</code>
     */
    const Success = 0;
    /**
     * Generated from protobuf enum <code>ExpiredLicense = 1;</code>
     */
    const ExpiredLicense = 1;
    /**
     * Generated from protobuf enum <code>DeactivatedLicense = 2;</code>
     */
    const DeactivatedLicense = 2;
    /**
     * Generated from protobuf enum <code>DisabledLicense = 3;</code>
     */
    const DisabledLicense = 3;
    /**
     * Generated from protobuf enum <code>NoSeats = 4;</code>
     */
    const NoSeats = 4;
    /**
     * Generated from protobuf enum <code>NoCopies = 5;</code>
     */
    const NoCopies = 5;
    /**
     * Generated from protobuf enum <code>MissingLicense = 6;</code>
     */
    const MissingLicense = 6;
    /**
     * Generated from protobuf enum <code>TimeDiscrepancy = 7;</code>
     */
    const TimeDiscrepancy = 7;
    /**
     * Generated from protobuf enum <code>BibleMissing = 8;</code>
     */
    const BibleMissing = 8;
    /**
     * Generated from protobuf enum <code>BibleNotPurchased = 9;</code>
     */
    const BibleNotPurchased = 9;
    /**
     * Generated from protobuf enum <code>BibleActivationMissing = 10;</code>
     */
    const BibleActivationMissing = 10;
    /**
     * Generated from protobuf enum <code>BibleDeactivated = 11;</code>
     */
    const BibleDeactivated = 11;
    /**
     * Generated from protobuf enum <code>NetworkError = 12;</code>
     */
    const NetworkError = 12;
    /**
     * Generated from protobuf enum <code>IOError = 13;</code>
     */
    const IOError = 13;
    /**
     * Generated from protobuf enum <code>NotInitialized = 14;</code>
     */
    const NotInitialized = 14;
    /**
     * Generated from protobuf enum <code>UnknownError = 15;</code>
     */
    const UnknownError = 15;

    private static $valueToName = [
        self::Success => 'Success',
        self::ExpiredLicense => 'ExpiredLicense',
        self::DeactivatedLicense => 'DeactivatedLicense',
        self::DisabledLicense => 'DisabledLicense',
        self::NoSeats => 'NoSeats',
        self::NoCopies => 'NoCopies',
        self::MissingLicense => 'MissingLicense',
        self::TimeDiscrepancy => 'TimeDiscrepancy',
        self::BibleMissing => 'BibleMissing',
        self::BibleNotPurchased => 'BibleNotPurchased',
        self::BibleActivationMissing => 'BibleActivationMissing',
        self::BibleDeactivated => 'BibleDeactivated',
        self::NetworkError => 'NetworkError',
        self::IOError => 'IOError',
        self::NotInitialized => 'NotInitialized',
        self::UnknownError => 'UnknownError',
    ];

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

