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

namespace PhpWA\Protocol\Proto;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.AIRichResponseSubMessageType</code>
 */
class AIRichResponseSubMessageType
{
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_UNKNOWN = 0;</code>
     */
    const AI_RICH_RESPONSE_UNKNOWN = 0;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_GRID_IMAGE = 1;</code>
     */
    const AI_RICH_RESPONSE_GRID_IMAGE = 1;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_TEXT = 2;</code>
     */
    const AI_RICH_RESPONSE_TEXT = 2;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_INLINE_IMAGE = 3;</code>
     */
    const AI_RICH_RESPONSE_INLINE_IMAGE = 3;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_TABLE = 4;</code>
     */
    const AI_RICH_RESPONSE_TABLE = 4;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_CODE = 5;</code>
     */
    const AI_RICH_RESPONSE_CODE = 5;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_DYNAMIC = 6;</code>
     */
    const AI_RICH_RESPONSE_DYNAMIC = 6;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_MAP = 7;</code>
     */
    const AI_RICH_RESPONSE_MAP = 7;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_LATEX = 8;</code>
     */
    const AI_RICH_RESPONSE_LATEX = 8;
    /**
     * Generated from protobuf enum <code>AI_RICH_RESPONSE_CONTENT_ITEMS = 9;</code>
     */
    const AI_RICH_RESPONSE_CONTENT_ITEMS = 9;

    private static $valueToName = [
        self::AI_RICH_RESPONSE_UNKNOWN => 'AI_RICH_RESPONSE_UNKNOWN',
        self::AI_RICH_RESPONSE_GRID_IMAGE => 'AI_RICH_RESPONSE_GRID_IMAGE',
        self::AI_RICH_RESPONSE_TEXT => 'AI_RICH_RESPONSE_TEXT',
        self::AI_RICH_RESPONSE_INLINE_IMAGE => 'AI_RICH_RESPONSE_INLINE_IMAGE',
        self::AI_RICH_RESPONSE_TABLE => 'AI_RICH_RESPONSE_TABLE',
        self::AI_RICH_RESPONSE_CODE => 'AI_RICH_RESPONSE_CODE',
        self::AI_RICH_RESPONSE_DYNAMIC => 'AI_RICH_RESPONSE_DYNAMIC',
        self::AI_RICH_RESPONSE_MAP => 'AI_RICH_RESPONSE_MAP',
        self::AI_RICH_RESPONSE_LATEX => 'AI_RICH_RESPONSE_LATEX',
        self::AI_RICH_RESPONSE_CONTENT_ITEMS => 'AI_RICH_RESPONSE_CONTENT_ITEMS',
    ];

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

