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

namespace Google\Cloud\Ces\V1\DataStoreSettings\Engine;

use UnexpectedValueException;

/**
 * The type of the engine.
 * See the documentation available at
 * https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/SolutionType
 * and
 * https://cloud.google.com/generative-ai-app-builder/docs/create-datastore-ingest.
 *
 * Protobuf type <code>google.cloud.ces.v1.DataStoreSettings.Engine.Type</code>
 */
class Type
{
    /**
     * Unspecified engine type.
     *
     * Generated from protobuf enum <code>TYPE_UNSPECIFIED = 0;</code>
     */
    const TYPE_UNSPECIFIED = 0;
    /**
     * The SOLUTION_TYPE_SEARCH engine for the app. All connector data stores
     * added to the app will be added to this engine.
     *
     * Generated from protobuf enum <code>ENGINE_TYPE_SEARCH = 1;</code>
     */
    const ENGINE_TYPE_SEARCH = 1;
    /**
     * Chat engine type.
     * The SOLUTION_TYPE_CHAT engine for the app. All connector data stores
     * added to the app will be added to this engine.
     *
     * Generated from protobuf enum <code>ENGINE_TYPE_CHAT = 2;</code>
     */
    const ENGINE_TYPE_CHAT = 2;

    private static $valueToName = [
        self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
        self::ENGINE_TYPE_SEARCH => 'ENGINE_TYPE_SEARCH',
        self::ENGINE_TYPE_CHAT => 'ENGINE_TYPE_CHAT',
    ];

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

