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

namespace PhpWA\Protocol\Proto\BotReminderMetadata;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.BotReminderMetadata.ReminderAction</code>
 */
class ReminderAction
{
    /**
     * Generated from protobuf enum <code>REMINDER_ACTION_UNSPECIFIED = 0;</code>
     */
    const REMINDER_ACTION_UNSPECIFIED = 0;
    /**
     * Generated from protobuf enum <code>NOTIFY = 1;</code>
     */
    const NOTIFY = 1;
    /**
     * Generated from protobuf enum <code>CREATE = 2;</code>
     */
    const CREATE = 2;
    /**
     * Generated from protobuf enum <code>DELETE = 3;</code>
     */
    const DELETE = 3;
    /**
     * Generated from protobuf enum <code>UPDATE = 4;</code>
     */
    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);
    }
}

