<?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.PopupAlertMessage</code>
 */
class PopupAlertMessage
{
    /**
     * Generated from protobuf enum <code>NoPopupAlert = 0;</code>
     */
    const NoPopupAlert = 0;
    /**
     * Generated from protobuf enum <code>SeatActivated = 1;</code>
     */
    const SeatActivated = 1;
    /**
     * Generated from protobuf enum <code>NoSeatActivated = 2;</code>
     */
    const NoSeatActivated = 2;
    /**
     * Generated from protobuf enum <code>NoLicenseActivated = 3;</code>
     */
    const NoLicenseActivated = 3;
    /**
     * Generated from protobuf enum <code>LegacyLicenseProContentActivated = 4;</code>
     */
    const LegacyLicenseProContentActivated = 4;
    /**
     * Generated from protobuf enum <code>FirstLaunchLegacyLicense = 5;</code>
     */
    const FirstLaunchLegacyLicense = 5;
    /**
     * Generated from protobuf enum <code>FullySignedOut = 6;</code>
     */
    const FullySignedOut = 6;
    /**
     * Generated from protobuf enum <code>FirstLaunchSignedInNoSubscriptionNoLicense = 7;</code>
     */
    const FirstLaunchSignedInNoSubscriptionNoLicense = 7;
    /**
     * Generated from protobuf enum <code>FirstLaunchSignedInNoSubscriptionLegacyLicense = 8;</code>
     */
    const FirstLaunchSignedInNoSubscriptionLegacyLicense = 8;

    private static $valueToName = [
        self::NoPopupAlert => 'NoPopupAlert',
        self::SeatActivated => 'SeatActivated',
        self::NoSeatActivated => 'NoSeatActivated',
        self::NoLicenseActivated => 'NoLicenseActivated',
        self::LegacyLicenseProContentActivated => 'LegacyLicenseProContentActivated',
        self::FirstLaunchLegacyLicense => 'FirstLaunchLegacyLicense',
        self::FullySignedOut => 'FullySignedOut',
        self::FirstLaunchSignedInNoSubscriptionNoLicense => 'FirstLaunchSignedInNoSubscriptionNoLicense',
        self::FirstLaunchSignedInNoSubscriptionLegacyLicense => 'FirstLaunchSignedInNoSubscriptionLegacyLicense',
    ];

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

