<?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.ClientAlertMessage</code>
 */
class ClientAlertMessage
{
    /**
     * Generated from protobuf enum <code>NoAlert = 0;</code>
     */
    const NoAlert = 0;
    /**
     * Generated from protobuf enum <code>ExpiredLicenseLegacy = 1;</code>
     */
    const ExpiredLicenseLegacy = 1;
    /**
     * Generated from protobuf enum <code>ExpiredSubscription = 2;</code>
     */
    const ExpiredSubscription = 2;
    /**
     * Generated from protobuf enum <code>InvalidLicense = 3;</code>
     */
    const InvalidLicense = 3;
    /**
     * Generated from protobuf enum <code>NoSeatsLegacy = 4;</code>
     */
    const NoSeatsLegacy = 4;
    /**
     * Generated from protobuf enum <code>NoSeatsSubscription = 5;</code>
     */
    const NoSeatsSubscription = 5;
    /**
     * Generated from protobuf enum <code>SeatDeactivatedSubscription = 6;</code>
     */
    const SeatDeactivatedSubscription = 6;
    /**
     * Generated from protobuf enum <code>TimeDiscrepancyAlert = 7;</code>
     */
    const TimeDiscrepancyAlert = 7;
    /**
     * Generated from protobuf enum <code>NoNetwork = 8;</code>
     */
    const NoNetwork = 8;
    /**
     * Generated from protobuf enum <code>NoBibleCopies = 9;</code>
     */
    const NoBibleCopies = 9;
    /**
     * Generated from protobuf enum <code>BibleMissingAlert = 10;</code>
     */
    const BibleMissingAlert = 10;
    /**
     * Generated from protobuf enum <code>BibleNotPurchasedLegacy = 11;</code>
     */
    const BibleNotPurchasedLegacy = 11;
    /**
     * Generated from protobuf enum <code>BibleNotPurchasedSubscription = 12;</code>
     */
    const BibleNotPurchasedSubscription = 12;
    /**
     * Generated from protobuf enum <code>UnsuccessfulBibleActivationLegacy = 13;</code>
     */
    const UnsuccessfulBibleActivationLegacy = 13;
    /**
     * Generated from protobuf enum <code>UnsuccessfulBibleActivationSubscription = 14;</code>
     */
    const UnsuccessfulBibleActivationSubscription = 14;
    /**
     * Generated from protobuf enum <code>IOErrorAlert = 15;</code>
     */
    const IOErrorAlert = 15;
    /**
     * Generated from protobuf enum <code>CodeExpiredAlert = 16;</code>
     */
    const CodeExpiredAlert = 16;
    /**
     * Generated from protobuf enum <code>CodeInvalidAlert = 17;</code>
     */
    const CodeInvalidAlert = 17;
    /**
     * Generated from protobuf enum <code>UnsuccessfulActivation = 18;</code>
     */
    const UnsuccessfulActivation = 18;
    /**
     * Generated from protobuf enum <code>DeviceSignedOutSubscription = 19;</code>
     */
    const DeviceSignedOutSubscription = 19;
    /**
     * Generated from protobuf enum <code>UnknownAlert = 20;</code>
     */
    const UnknownAlert = 20;

    private static $valueToName = [
        self::NoAlert => 'NoAlert',
        self::ExpiredLicenseLegacy => 'ExpiredLicenseLegacy',
        self::ExpiredSubscription => 'ExpiredSubscription',
        self::InvalidLicense => 'InvalidLicense',
        self::NoSeatsLegacy => 'NoSeatsLegacy',
        self::NoSeatsSubscription => 'NoSeatsSubscription',
        self::SeatDeactivatedSubscription => 'SeatDeactivatedSubscription',
        self::TimeDiscrepancyAlert => 'TimeDiscrepancyAlert',
        self::NoNetwork => 'NoNetwork',
        self::NoBibleCopies => 'NoBibleCopies',
        self::BibleMissingAlert => 'BibleMissingAlert',
        self::BibleNotPurchasedLegacy => 'BibleNotPurchasedLegacy',
        self::BibleNotPurchasedSubscription => 'BibleNotPurchasedSubscription',
        self::UnsuccessfulBibleActivationLegacy => 'UnsuccessfulBibleActivationLegacy',
        self::UnsuccessfulBibleActivationSubscription => 'UnsuccessfulBibleActivationSubscription',
        self::IOErrorAlert => 'IOErrorAlert',
        self::CodeExpiredAlert => 'CodeExpiredAlert',
        self::CodeInvalidAlert => 'CodeInvalidAlert',
        self::UnsuccessfulActivation => 'UnsuccessfulActivation',
        self::DeviceSignedOutSubscription => 'DeviceSignedOutSubscription',
        self::UnknownAlert => 'UnknownAlert',
    ];

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

