<?php
 
 
 

namespace PhpWA\Protocol\Proto;

use UnexpectedValueException;




class BotMetricsThreadEntryPoint
{
    


    const BOT_METRICS_THREAD_ENTRY_POINT_UNSPECIFIED = 0;
    


    const AI_TAB_THREAD = 1;
    


    const AI_HOME_THREAD = 2;
    


    const AI_DEEPLINK_IMMERSIVE_THREAD = 3;
    


    const AI_DEEPLINK_THREAD = 4;
    


    const ASK_META_AI_CONTEXT_MENU_THREAD = 5;

    private static $valueToName = [
        self::BOT_METRICS_THREAD_ENTRY_POINT_UNSPECIFIED => 'BOT_METRICS_THREAD_ENTRY_POINT_UNSPECIFIED',
        self::AI_TAB_THREAD => 'AI_TAB_THREAD',
        self::AI_HOME_THREAD => 'AI_HOME_THREAD',
        self::AI_DEEPLINK_IMMERSIVE_THREAD => 'AI_DEEPLINK_IMMERSIVE_THREAD',
        self::AI_DEEPLINK_THREAD => 'AI_DEEPLINK_THREAD',
        self::ASK_META_AI_CONTEXT_MENU_THREAD => 'ASK_META_AI_CONTEXT_MENU_THREAD',
    ];

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

