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

namespace OS\PB\ModemResponse;

use UnexpectedValueException;

/**
 * Protobuf type <code>OS.PB.ModemResponse.ModemNetworkAccessType</code>
 */
class ModemNetworkAccessType
{
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_NotSet = 0;</code>
     */
    const ModemNetworkAccess_NotSet = 0;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_GSM = 1;</code>
     */
    const ModemNetworkAccess_GSM = 1;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_GSMCompact = 2;</code>
     */
    const ModemNetworkAccess_GSMCompact = 2;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_UTRAN = 3;</code>
     */
    const ModemNetworkAccess_UTRAN = 3;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_Modem_withEGPRS = 4;</code>
     */
    const ModemNetworkAccess_Modem_withEGPRS = 4;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_UTRAN_withHSDPA = 5;</code>
     */
    const ModemNetworkAccess_UTRAN_withHSDPA = 5;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_UTRAN_withHSUPA = 6;</code>
     */
    const ModemNetworkAccess_UTRAN_withHSUPA = 6;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_UTRAN_withHSDPAandHSUPA = 7;</code>
     */
    const ModemNetworkAccess_UTRAN_withHSDPAandHSUPA = 7;
    /**
     * Generated from protobuf enum <code>ModemNetworkAccess_E_UTRAN = 8;</code>
     */
    const ModemNetworkAccess_E_UTRAN = 8;

    private static $valueToName = [
        self::ModemNetworkAccess_NotSet => 'ModemNetworkAccess_NotSet',
        self::ModemNetworkAccess_GSM => 'ModemNetworkAccess_GSM',
        self::ModemNetworkAccess_GSMCompact => 'ModemNetworkAccess_GSMCompact',
        self::ModemNetworkAccess_UTRAN => 'ModemNetworkAccess_UTRAN',
        self::ModemNetworkAccess_Modem_withEGPRS => 'ModemNetworkAccess_Modem_withEGPRS',
        self::ModemNetworkAccess_UTRAN_withHSDPA => 'ModemNetworkAccess_UTRAN_withHSDPA',
        self::ModemNetworkAccess_UTRAN_withHSUPA => 'ModemNetworkAccess_UTRAN_withHSUPA',
        self::ModemNetworkAccess_UTRAN_withHSDPAandHSUPA => 'ModemNetworkAccess_UTRAN_withHSDPAandHSUPA',
        self::ModemNetworkAccess_E_UTRAN => 'ModemNetworkAccess_E_UTRAN',
    ];

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

