<?php
 
 
 

namespace PhpWA\Protocol\Proto\BotReminderMetadata;

use UnexpectedValueException;




class ReminderAction
{
    


    const REMINDER_ACTION_UNSPECIFIED = 0;
    


    const NOTIFY = 1;
    


    const CREATE = 2;
    


    const DELETE = 3;
    


    const UPDATE = 4;

    private static $valueToName = [
        self::REMINDER_ACTION_UNSPECIFIED => 'REMINDER_ACTION_UNSPECIFIED',
        self::NOTIFY => 'NOTIFY',
        self::CREATE => 'CREATE',
        self::DELETE => 'DELETE',
        self::UPDATE => 'UPDATE',
    ];

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

