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

namespace PhpWA\Protocol\Proto\ClientPayload;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.ClientPayload.ConnectType</code>
 */
class ConnectType
{
    /**
     * Generated from protobuf enum <code>CELLULAR_UNKNOWN = 0;</code>
     */
    const CELLULAR_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>WIFI_UNKNOWN = 1;</code>
     */
    const WIFI_UNKNOWN = 1;
    /**
     * Generated from protobuf enum <code>CELLULAR_EDGE = 100;</code>
     */
    const CELLULAR_EDGE = 100;
    /**
     * Generated from protobuf enum <code>CELLULAR_IDEN = 101;</code>
     */
    const CELLULAR_IDEN = 101;
    /**
     * Generated from protobuf enum <code>CELLULAR_UMTS = 102;</code>
     */
    const CELLULAR_UMTS = 102;
    /**
     * Generated from protobuf enum <code>CELLULAR_EVDO = 103;</code>
     */
    const CELLULAR_EVDO = 103;
    /**
     * Generated from protobuf enum <code>CELLULAR_GPRS = 104;</code>
     */
    const CELLULAR_GPRS = 104;
    /**
     * Generated from protobuf enum <code>CELLULAR_HSDPA = 105;</code>
     */
    const CELLULAR_HSDPA = 105;
    /**
     * Generated from protobuf enum <code>CELLULAR_HSUPA = 106;</code>
     */
    const CELLULAR_HSUPA = 106;
    /**
     * Generated from protobuf enum <code>CELLULAR_HSPA = 107;</code>
     */
    const CELLULAR_HSPA = 107;
    /**
     * Generated from protobuf enum <code>CELLULAR_CDMA = 108;</code>
     */
    const CELLULAR_CDMA = 108;
    /**
     * Generated from protobuf enum <code>CELLULAR_1XRTT = 109;</code>
     */
    const CELLULAR_1XRTT = 109;
    /**
     * Generated from protobuf enum <code>CELLULAR_EHRPD = 110;</code>
     */
    const CELLULAR_EHRPD = 110;
    /**
     * Generated from protobuf enum <code>CELLULAR_LTE = 111;</code>
     */
    const CELLULAR_LTE = 111;
    /**
     * Generated from protobuf enum <code>CELLULAR_HSPAP = 112;</code>
     */
    const CELLULAR_HSPAP = 112;

    private static $valueToName = [
        self::CELLULAR_UNKNOWN => 'CELLULAR_UNKNOWN',
        self::WIFI_UNKNOWN => 'WIFI_UNKNOWN',
        self::CELLULAR_EDGE => 'CELLULAR_EDGE',
        self::CELLULAR_IDEN => 'CELLULAR_IDEN',
        self::CELLULAR_UMTS => 'CELLULAR_UMTS',
        self::CELLULAR_EVDO => 'CELLULAR_EVDO',
        self::CELLULAR_GPRS => 'CELLULAR_GPRS',
        self::CELLULAR_HSDPA => 'CELLULAR_HSDPA',
        self::CELLULAR_HSUPA => 'CELLULAR_HSUPA',
        self::CELLULAR_HSPA => 'CELLULAR_HSPA',
        self::CELLULAR_CDMA => 'CELLULAR_CDMA',
        self::CELLULAR_1XRTT => 'CELLULAR_1XRTT',
        self::CELLULAR_EHRPD => 'CELLULAR_EHRPD',
        self::CELLULAR_LTE => 'CELLULAR_LTE',
        self::CELLULAR_HSPAP => 'CELLULAR_HSPAP',
    ];

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

