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

namespace OS\PB\ModemResponse;

use UnexpectedValueException;

/**
 * Cell Network Information
 *
 * Protobuf type <code>OS.PB.ModemResponse.ModemNetworkStatusType</code>
 */
class ModemNetworkStatusType
{
    /**
     * Generated from protobuf enum <code>ModemNetworkStatus_NotSet = 0;</code>
     */
    const ModemNetworkStatus_NotSet = 0;
    /**
     * not registered, MT is not currently searching a new operator to register to
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_NoReg_notSearching = 1;</code>
     */
    const ModemNetworkStatus_NoReg_notSearching = 1;
    /**
     * registered, home network
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Registered_home = 2;</code>
     */
    const ModemNetworkStatus_Registered_home = 2;
    /**
     * not registered, but MT is currently searching a new operator to register to
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_NoReg_searching = 3;</code>
     */
    const ModemNetworkStatus_NoReg_searching = 3;
    /**
     * registration denied
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_NoReg_denied = 4;</code>
     */
    const ModemNetworkStatus_NoReg_denied = 4;
    /**
     * unknown (e.g. out of GERAN/UTRAN/E-UTRAN coverage)
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Unknown = 5;</code>
     */
    const ModemNetworkStatus_Unknown = 5;
    /**
     * registered, roaming
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Registered_Roam = 6;</code>
     */
    const ModemNetworkStatus_Registered_Roam = 6;
    /**
     * registered for "SMS only", home network (applicable only when indicates E-UTRAN)
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Registered_HomeSmsOnly = 7;</code>
     */
    const ModemNetworkStatus_Registered_HomeSmsOnly = 7;
    /**
     * registered for "SMS only", roaming (applicable only when indicates E-UTRAN)
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Registered_RoamSmsOnly = 8;</code>
     */
    const ModemNetworkStatus_Registered_RoamSmsOnly = 8;
    /**
     * attached for emergency bearer services only (see NOTE 2) (not applicable)
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Registered_EmergencyOnly = 9;</code>
     */
    const ModemNetworkStatus_Registered_EmergencyOnly = 9;
    /**
     * registered for "CSFB not preferred", home network (applicable only when indicates E-UTRAN)
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Registered_HomeCSFBNotPref = 10;</code>
     */
    const ModemNetworkStatus_Registered_HomeCSFBNotPref = 10;
    /**
     * registered for "CSFB not preferred", roaming (applicable only when indicates E-UTRAN)    
     *
     * Generated from protobuf enum <code>ModemNetworkStatus_Registered_RoamCSFBNotPref = 11;</code>
     */
    const ModemNetworkStatus_Registered_RoamCSFBNotPref = 11;

    private static $valueToName = [
        self::ModemNetworkStatus_NotSet => 'ModemNetworkStatus_NotSet',
        self::ModemNetworkStatus_NoReg_notSearching => 'ModemNetworkStatus_NoReg_notSearching',
        self::ModemNetworkStatus_Registered_home => 'ModemNetworkStatus_Registered_home',
        self::ModemNetworkStatus_NoReg_searching => 'ModemNetworkStatus_NoReg_searching',
        self::ModemNetworkStatus_NoReg_denied => 'ModemNetworkStatus_NoReg_denied',
        self::ModemNetworkStatus_Unknown => 'ModemNetworkStatus_Unknown',
        self::ModemNetworkStatus_Registered_Roam => 'ModemNetworkStatus_Registered_Roam',
        self::ModemNetworkStatus_Registered_HomeSmsOnly => 'ModemNetworkStatus_Registered_HomeSmsOnly',
        self::ModemNetworkStatus_Registered_RoamSmsOnly => 'ModemNetworkStatus_Registered_RoamSmsOnly',
        self::ModemNetworkStatus_Registered_EmergencyOnly => 'ModemNetworkStatus_Registered_EmergencyOnly',
        self::ModemNetworkStatus_Registered_HomeCSFBNotPref => 'ModemNetworkStatus_Registered_HomeCSFBNotPref',
        self::ModemNetworkStatus_Registered_RoamCSFBNotPref => 'ModemNetworkStatus_Registered_RoamCSFBNotPref',
    ];

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

