<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/databasecenter/v1beta/product.proto

namespace Google\Cloud\DatabaseCenter\V1beta;

use UnexpectedValueException;

/**
 * Engine refers to underlying database binary running in an instance.
 *
 * Protobuf type <code>google.cloud.databasecenter.v1beta.Engine</code>
 */
class Engine
{
    /**
     * UNSPECIFIED means engine type is not known or available.
     *
     * Generated from protobuf enum <code>ENGINE_UNSPECIFIED = 0;</code>
     */
    const ENGINE_UNSPECIFIED = 0;
    /**
     * MySQL binary running as an engine in the database instance.
     *
     * Generated from protobuf enum <code>ENGINE_MYSQL = 1;</code>
     */
    const ENGINE_MYSQL = 1;
    /**
     * Postgres binary running as engine in database instance.
     *
     * Generated from protobuf enum <code>ENGINE_POSTGRES = 2;</code>
     */
    const ENGINE_POSTGRES = 2;
    /**
     * SQLServer binary running as engine in database instance.
     *
     * Generated from protobuf enum <code>ENGINE_SQL_SERVER = 3;</code>
     */
    const ENGINE_SQL_SERVER = 3;
    /**
     * Native database binary running as engine in instance.
     *
     * Generated from protobuf enum <code>ENGINE_NATIVE = 4;</code>
     */
    const ENGINE_NATIVE = 4;
    /**
     * Memorystore with Redis dialect.
     *
     * Generated from protobuf enum <code>ENGINE_MEMORYSTORE_FOR_REDIS = 8;</code>
     */
    const ENGINE_MEMORYSTORE_FOR_REDIS = 8;
    /**
     * Memorystore with Redis cluster dialect.
     *
     * Generated from protobuf enum <code>ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER = 9;</code>
     */
    const ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER = 9;
    /**
     * Firestore with native mode.
     *
     * Generated from protobuf enum <code>ENGINE_FIRESTORE_WITH_NATIVE_MODE = 10;</code>
     */
    const ENGINE_FIRESTORE_WITH_NATIVE_MODE = 10;
    /**
     * Firestore with datastore mode.
     *
     * Generated from protobuf enum <code>ENGINE_FIRESTORE_WITH_DATASTORE_MODE = 11;</code>
     */
    const ENGINE_FIRESTORE_WITH_DATASTORE_MODE = 11;
    /**
     * Oracle Exadata engine.
     *
     * Generated from protobuf enum <code>ENGINE_EXADATA_ORACLE = 12;</code>
     */
    const ENGINE_EXADATA_ORACLE = 12;
    /**
     * Oracle Autonomous DB Serverless engine.
     *
     * Generated from protobuf enum <code>ENGINE_ADB_SERVERLESS_ORACLE = 13;</code>
     */
    const ENGINE_ADB_SERVERLESS_ORACLE = 13;
    /**
     * Firestore with MongoDB compatibility.
     *
     * Generated from protobuf enum <code>ENGINE_FIRESTORE_WITH_MONGODB_COMPATIBILITY_MODE = 14;</code>
     */
    const ENGINE_FIRESTORE_WITH_MONGODB_COMPATIBILITY_MODE = 14;
    /**
     * Other refers to rest of other database engine. This is to be when engine is
     * known, but it is not present in this enum.
     *
     * Generated from protobuf enum <code>ENGINE_OTHER = 6;</code>
     */
    const ENGINE_OTHER = 6;

    private static $valueToName = [
        self::ENGINE_UNSPECIFIED => 'ENGINE_UNSPECIFIED',
        self::ENGINE_MYSQL => 'ENGINE_MYSQL',
        self::ENGINE_POSTGRES => 'ENGINE_POSTGRES',
        self::ENGINE_SQL_SERVER => 'ENGINE_SQL_SERVER',
        self::ENGINE_NATIVE => 'ENGINE_NATIVE',
        self::ENGINE_MEMORYSTORE_FOR_REDIS => 'ENGINE_MEMORYSTORE_FOR_REDIS',
        self::ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER => 'ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER',
        self::ENGINE_FIRESTORE_WITH_NATIVE_MODE => 'ENGINE_FIRESTORE_WITH_NATIVE_MODE',
        self::ENGINE_FIRESTORE_WITH_DATASTORE_MODE => 'ENGINE_FIRESTORE_WITH_DATASTORE_MODE',
        self::ENGINE_EXADATA_ORACLE => 'ENGINE_EXADATA_ORACLE',
        self::ENGINE_ADB_SERVERLESS_ORACLE => 'ENGINE_ADB_SERVERLESS_ORACLE',
        self::ENGINE_FIRESTORE_WITH_MONGODB_COMPATIBILITY_MODE => 'ENGINE_FIRESTORE_WITH_MONGODB_COMPATIBILITY_MODE',
        self::ENGINE_OTHER => 'ENGINE_OTHER',
    ];

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

