<?php
 
 
 

namespace PhpWA\Protocol\Proto\ClientPayload\UserAgent;

use UnexpectedValueException;




class Platform
{
    


    const ANDROID = 0;
    


    const IOS = 1;
    


    const WINDOWS_PHONE = 2;
    


    const BLACKBERRY = 3;
    


    const BLACKBERRYX = 4;
    


    const S40 = 5;
    


    const S60 = 6;
    


    const PYTHON_CLIENT = 7;
    


    const TIZEN = 8;
    


    const ENTERPRISE = 9;
    


    const SMB_ANDROID = 10;
    


    const KAIOS = 11;
    


    const SMB_IOS = 12;
    


    const WINDOWS = 13;
    


    const WEB = 14;
    


    const PORTAL = 15;
    


    const GREEN_ANDROID = 16;
    


    const GREEN_IPHONE = 17;
    


    const BLUE_ANDROID = 18;
    


    const BLUE_IPHONE = 19;
    


    const FBLITE_ANDROID = 20;
    


    const MLITE_ANDROID = 21;
    


    const IGLITE_ANDROID = 22;
    


    const PAGE = 23;
    


    const MACOS = 24;
    


    const OCULUS_MSG = 25;
    


    const OCULUS_CALL = 26;
    


    const MILAN = 27;
    


    const CAPI = 28;
    


    const WEAROS = 29;
    


    const ARDEVICE = 30;
    


    const VRDEVICE = 31;
    


    const BLUE_WEB = 32;
    


    const IPAD = 33;
    


    const TEST = 34;
    


    const SMART_GLASSES = 35;
    


    const BLUE_VR = 36;
    


    const AR_WRIST = 37;

    private static $valueToName = [
        self::ANDROID => 'ANDROID',
        self::IOS => 'IOS',
        self::WINDOWS_PHONE => 'WINDOWS_PHONE',
        self::BLACKBERRY => 'BLACKBERRY',
        self::BLACKBERRYX => 'BLACKBERRYX',
        self::S40 => 'S40',
        self::S60 => 'S60',
        self::PYTHON_CLIENT => 'PYTHON_CLIENT',
        self::TIZEN => 'TIZEN',
        self::ENTERPRISE => 'ENTERPRISE',
        self::SMB_ANDROID => 'SMB_ANDROID',
        self::KAIOS => 'KAIOS',
        self::SMB_IOS => 'SMB_IOS',
        self::WINDOWS => 'WINDOWS',
        self::WEB => 'WEB',
        self::PORTAL => 'PORTAL',
        self::GREEN_ANDROID => 'GREEN_ANDROID',
        self::GREEN_IPHONE => 'GREEN_IPHONE',
        self::BLUE_ANDROID => 'BLUE_ANDROID',
        self::BLUE_IPHONE => 'BLUE_IPHONE',
        self::FBLITE_ANDROID => 'FBLITE_ANDROID',
        self::MLITE_ANDROID => 'MLITE_ANDROID',
        self::IGLITE_ANDROID => 'IGLITE_ANDROID',
        self::PAGE => 'PAGE',
        self::MACOS => 'MACOS',
        self::OCULUS_MSG => 'OCULUS_MSG',
        self::OCULUS_CALL => 'OCULUS_CALL',
        self::MILAN => 'MILAN',
        self::CAPI => 'CAPI',
        self::WEAROS => 'WEAROS',
        self::ARDEVICE => 'ARDEVICE',
        self::VRDEVICE => 'VRDEVICE',
        self::BLUE_WEB => 'BLUE_WEB',
        self::IPAD => 'IPAD',
        self::TEST => 'TEST',
        self::SMART_GLASSES => 'SMART_GLASSES',
        self::BLUE_VR => 'BLUE_VR',
        self::AR_WRIST => 'AR_WRIST',
    ];

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

