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

namespace PhpWA\Protocol\Proto\DeviceProps;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.DeviceProps.PlatformType</code>
 */
class PlatformType
{
    /**
     * Generated from protobuf enum <code>UNKNOWN = 0;</code>
     */
    const UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>CHROME = 1;</code>
     */
    const CHROME = 1;
    /**
     * Generated from protobuf enum <code>FIREFOX = 2;</code>
     */
    const FIREFOX = 2;
    /**
     * Generated from protobuf enum <code>IE = 3;</code>
     */
    const IE = 3;
    /**
     * Generated from protobuf enum <code>OPERA = 4;</code>
     */
    const OPERA = 4;
    /**
     * Generated from protobuf enum <code>SAFARI = 5;</code>
     */
    const SAFARI = 5;
    /**
     * Generated from protobuf enum <code>EDGE = 6;</code>
     */
    const EDGE = 6;
    /**
     * Generated from protobuf enum <code>DESKTOP = 7;</code>
     */
    const DESKTOP = 7;
    /**
     * Generated from protobuf enum <code>IPAD = 8;</code>
     */
    const IPAD = 8;
    /**
     * Generated from protobuf enum <code>ANDROID_TABLET = 9;</code>
     */
    const ANDROID_TABLET = 9;
    /**
     * Generated from protobuf enum <code>OHANA = 10;</code>
     */
    const OHANA = 10;
    /**
     * Generated from protobuf enum <code>ALOHA = 11;</code>
     */
    const ALOHA = 11;
    /**
     * Generated from protobuf enum <code>CATALINA = 12;</code>
     */
    const CATALINA = 12;
    /**
     * Generated from protobuf enum <code>TCL_TV = 13;</code>
     */
    const TCL_TV = 13;
    /**
     * Generated from protobuf enum <code>IOS_PHONE = 14;</code>
     */
    const IOS_PHONE = 14;
    /**
     * Generated from protobuf enum <code>IOS_CATALYST = 15;</code>
     */
    const IOS_CATALYST = 15;
    /**
     * Generated from protobuf enum <code>ANDROID_PHONE = 16;</code>
     */
    const ANDROID_PHONE = 16;
    /**
     * Generated from protobuf enum <code>ANDROID_AMBIGUOUS = 17;</code>
     */
    const ANDROID_AMBIGUOUS = 17;
    /**
     * Generated from protobuf enum <code>WEAR_OS = 18;</code>
     */
    const WEAR_OS = 18;
    /**
     * Generated from protobuf enum <code>AR_WRIST = 19;</code>
     */
    const AR_WRIST = 19;
    /**
     * Generated from protobuf enum <code>AR_DEVICE = 20;</code>
     */
    const AR_DEVICE = 20;
    /**
     * Generated from protobuf enum <code>UWP = 21;</code>
     */
    const UWP = 21;
    /**
     * Generated from protobuf enum <code>VR = 22;</code>
     */
    const VR = 22;
    /**
     * Generated from protobuf enum <code>CLOUD_API = 23;</code>
     */
    const CLOUD_API = 23;
    /**
     * Generated from protobuf enum <code>SMARTGLASSES = 24;</code>
     */
    const SMARTGLASSES = 24;

    private static $valueToName = [
        self::UNKNOWN => 'UNKNOWN',
        self::CHROME => 'CHROME',
        self::FIREFOX => 'FIREFOX',
        self::IE => 'IE',
        self::OPERA => 'OPERA',
        self::SAFARI => 'SAFARI',
        self::EDGE => 'EDGE',
        self::DESKTOP => 'DESKTOP',
        self::IPAD => 'IPAD',
        self::ANDROID_TABLET => 'ANDROID_TABLET',
        self::OHANA => 'OHANA',
        self::ALOHA => 'ALOHA',
        self::CATALINA => 'CATALINA',
        self::TCL_TV => 'TCL_TV',
        self::IOS_PHONE => 'IOS_PHONE',
        self::IOS_CATALYST => 'IOS_CATALYST',
        self::ANDROID_PHONE => 'ANDROID_PHONE',
        self::ANDROID_AMBIGUOUS => 'ANDROID_AMBIGUOUS',
        self::WEAR_OS => 'WEAR_OS',
        self::AR_WRIST => 'AR_WRIST',
        self::AR_DEVICE => 'AR_DEVICE',
        self::UWP => 'UWP',
        self::VR => 'VR',
        self::CLOUD_API => 'CLOUD_API',
        self::SMARTGLASSES => 'SMARTGLASSES',
    ];

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

