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

namespace Google\Cloud\Dataplex\V1\Content\SqlScript;

use UnexpectedValueException;

/**
 * Query Engine Type of the SQL Script.
 *
 * Protobuf type <code>google.cloud.dataplex.v1.Content.SqlScript.QueryEngine</code>
 */
class QueryEngine
{
    /**
     * Value was unspecified.
     *
     * Generated from protobuf enum <code>QUERY_ENGINE_UNSPECIFIED = 0;</code>
     */
    const QUERY_ENGINE_UNSPECIFIED = 0;
    /**
     * Spark SQL Query.
     *
     * Generated from protobuf enum <code>SPARK = 2;</code>
     */
    const SPARK = 2;

    private static $valueToName = [
        self::QUERY_ENGINE_UNSPECIFIED => 'QUERY_ENGINE_UNSPECIFIED',
        self::SPARK => 'SPARK',
    ];

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

