<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/enums/v1/reset.proto

namespace Temporal\Api\Enums\V1;

use UnexpectedValueException;

/**
 * Deprecated: applications should use ResetReapplyExcludeType to specify
 * exclusions from this set, and new event types should be added to ResetReapplyExcludeType
 * instead of here.
 *
 * Protobuf type <code>temporal.api.enums.v1.ResetReapplyType</code>
 */
class ResetReapplyType
{
    /**
     * Generated from protobuf enum <code>RESET_REAPPLY_TYPE_UNSPECIFIED = 0;</code>
     */
    const RESET_REAPPLY_TYPE_UNSPECIFIED = 0;
    /**
     * Signals are reapplied when workflow is reset.
     *
     * Generated from protobuf enum <code>RESET_REAPPLY_TYPE_SIGNAL = 1;</code>
     */
    const RESET_REAPPLY_TYPE_SIGNAL = 1;
    /**
     * No events are reapplied when workflow is reset.
     *
     * Generated from protobuf enum <code>RESET_REAPPLY_TYPE_NONE = 2;</code>
     */
    const RESET_REAPPLY_TYPE_NONE = 2;
    /**
     * All eligible events are reapplied when workflow is reset.
     *
     * Generated from protobuf enum <code>RESET_REAPPLY_TYPE_ALL_ELIGIBLE = 3;</code>
     */
    const RESET_REAPPLY_TYPE_ALL_ELIGIBLE = 3;

    private static $valueToName = [
        self::RESET_REAPPLY_TYPE_UNSPECIFIED => 'RESET_REAPPLY_TYPE_UNSPECIFIED',
        self::RESET_REAPPLY_TYPE_SIGNAL => 'RESET_REAPPLY_TYPE_SIGNAL',
        self::RESET_REAPPLY_TYPE_NONE => 'RESET_REAPPLY_TYPE_NONE',
        self::RESET_REAPPLY_TYPE_ALL_ELIGIBLE => 'RESET_REAPPLY_TYPE_ALL_ELIGIBLE',
    ];

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

