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

namespace PhpWA\Protocol\Proto\PatchDebugData;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.PatchDebugData.Platform</code>
 */
class Platform
{
    /**
     * Generated from protobuf enum <code>ANDROID = 0;</code>
     */
    const ANDROID = 0;
    /**
     * Generated from protobuf enum <code>SMBA = 1;</code>
     */
    const SMBA = 1;
    /**
     * Generated from protobuf enum <code>IPHONE = 2;</code>
     */
    const IPHONE = 2;
    /**
     * Generated from protobuf enum <code>SMBI = 3;</code>
     */
    const SMBI = 3;
    /**
     * Generated from protobuf enum <code>WEB = 4;</code>
     */
    const WEB = 4;
    /**
     * Generated from protobuf enum <code>UWP = 5;</code>
     */
    const UWP = 5;
    /**
     * Generated from protobuf enum <code>DARWIN = 6;</code>
     */
    const DARWIN = 6;
    /**
     * Generated from protobuf enum <code>IPAD = 7;</code>
     */
    const IPAD = 7;
    /**
     * Generated from protobuf enum <code>WEAROS = 8;</code>
     */
    const WEAROS = 8;
    /**
     * Generated from protobuf enum <code>WASG = 9;</code>
     */
    const WASG = 9;
    /**
     * Generated from protobuf enum <code>WEARM = 10;</code>
     */
    const WEARM = 10;
    /**
     * Generated from protobuf enum <code>CAPI = 11;</code>
     */
    const CAPI = 11;

    private static $valueToName = [
        self::ANDROID => 'ANDROID',
        self::SMBA => 'SMBA',
        self::IPHONE => 'IPHONE',
        self::SMBI => 'SMBI',
        self::WEB => 'WEB',
        self::UWP => 'UWP',
        self::DARWIN => 'DARWIN',
        self::IPAD => 'IPAD',
        self::WEAROS => 'WEAROS',
        self::WASG => 'WASG',
        self::WEARM => 'WEARM',
        self::CAPI => 'CAPI',
    ];

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

