<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/evaluation_service.proto

namespace Google\Cloud\AIPlatform\V1\CometSpec;

use UnexpectedValueException;

/**
 * Comet version options.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.CometSpec.CometVersion</code>
 */
class CometVersion
{
    /**
     * Comet version unspecified.
     *
     * Generated from protobuf enum <code>COMET_VERSION_UNSPECIFIED = 0;</code>
     */
    const COMET_VERSION_UNSPECIFIED = 0;
    /**
     * Comet 22 for translation + source + reference
     * (source-reference-combined).
     *
     * Generated from protobuf enum <code>COMET_22_SRC_REF = 2;</code>
     */
    const COMET_22_SRC_REF = 2;

    private static $valueToName = [
        self::COMET_VERSION_UNSPECIFIED => 'COMET_VERSION_UNSPECIFIED',
        self::COMET_22_SRC_REF => 'COMET_22_SRC_REF',
    ];

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


