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

namespace PhpWA\Protocol\Proto\Message\ExtendedTextMessage;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.Message.ExtendedTextMessage.FontType</code>
 */
class FontType
{
    /**
     * Generated from protobuf enum <code>SYSTEM = 0;</code>
     */
    const SYSTEM = 0;
    /**
     * Generated from protobuf enum <code>SYSTEM_TEXT = 1;</code>
     */
    const SYSTEM_TEXT = 1;
    /**
     * Generated from protobuf enum <code>FB_SCRIPT = 2;</code>
     */
    const FB_SCRIPT = 2;
    /**
     * Generated from protobuf enum <code>SYSTEM_BOLD = 6;</code>
     */
    const SYSTEM_BOLD = 6;
    /**
     * Generated from protobuf enum <code>MORNINGBREEZE_REGULAR = 7;</code>
     */
    const MORNINGBREEZE_REGULAR = 7;
    /**
     * Generated from protobuf enum <code>CALISTOGA_REGULAR = 8;</code>
     */
    const CALISTOGA_REGULAR = 8;
    /**
     * Generated from protobuf enum <code>EXO2_EXTRABOLD = 9;</code>
     */
    const EXO2_EXTRABOLD = 9;
    /**
     * Generated from protobuf enum <code>COURIERPRIME_BOLD = 10;</code>
     */
    const COURIERPRIME_BOLD = 10;

    private static $valueToName = [
        self::SYSTEM => 'SYSTEM',
        self::SYSTEM_TEXT => 'SYSTEM_TEXT',
        self::FB_SCRIPT => 'FB_SCRIPT',
        self::SYSTEM_BOLD => 'SYSTEM_BOLD',
        self::MORNINGBREEZE_REGULAR => 'MORNINGBREEZE_REGULAR',
        self::CALISTOGA_REGULAR => 'CALISTOGA_REGULAR',
        self::EXO2_EXTRABOLD => 'EXO2_EXTRABOLD',
        self::COURIERPRIME_BOLD => 'COURIERPRIME_BOLD',
    ];

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

