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

namespace Temporal\Api\Enums\V1;

use UnexpectedValueException;

/**
 * Protobuf type <code>temporal.api.enums.v1.BatchOperationType</code>
 */
class BatchOperationType
{
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_UNSPECIFIED = 0;</code>
     */
    const BATCH_OPERATION_TYPE_UNSPECIFIED = 0;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_TERMINATE = 1;</code>
     */
    const BATCH_OPERATION_TYPE_TERMINATE = 1;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_CANCEL = 2;</code>
     */
    const BATCH_OPERATION_TYPE_CANCEL = 2;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_SIGNAL = 3;</code>
     */
    const BATCH_OPERATION_TYPE_SIGNAL = 3;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_DELETE = 4;</code>
     */
    const BATCH_OPERATION_TYPE_DELETE = 4;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_RESET = 5;</code>
     */
    const BATCH_OPERATION_TYPE_RESET = 5;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6;</code>
     */
    const BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS = 6;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY = 7;</code>
     */
    const BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY = 7;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS = 8;</code>
     */
    const BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS = 8;
    /**
     * Generated from protobuf enum <code>BATCH_OPERATION_TYPE_RESET_ACTIVITY = 9;</code>
     */
    const BATCH_OPERATION_TYPE_RESET_ACTIVITY = 9;

    private static $valueToName = [
        self::BATCH_OPERATION_TYPE_UNSPECIFIED => 'BATCH_OPERATION_TYPE_UNSPECIFIED',
        self::BATCH_OPERATION_TYPE_TERMINATE => 'BATCH_OPERATION_TYPE_TERMINATE',
        self::BATCH_OPERATION_TYPE_CANCEL => 'BATCH_OPERATION_TYPE_CANCEL',
        self::BATCH_OPERATION_TYPE_SIGNAL => 'BATCH_OPERATION_TYPE_SIGNAL',
        self::BATCH_OPERATION_TYPE_DELETE => 'BATCH_OPERATION_TYPE_DELETE',
        self::BATCH_OPERATION_TYPE_RESET => 'BATCH_OPERATION_TYPE_RESET',
        self::BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS => 'BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS',
        self::BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY => 'BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY',
        self::BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS => 'BATCH_OPERATION_TYPE_UPDATE_ACTIVITY_OPTIONS',
        self::BATCH_OPERATION_TYPE_RESET_ACTIVITY => 'BATCH_OPERATION_TYPE_RESET_ACTIVITY',
    ];

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

