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

namespace Google\Cloud\Dataform\V1beta1\InvocationConfig;

use UnexpectedValueException;

/**
 * Types of priority for query execution in BigQuery.
 *
 * Protobuf type <code>google.cloud.dataform.v1beta1.InvocationConfig.QueryPriority</code>
 */
class QueryPriority
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>QUERY_PRIORITY_UNSPECIFIED = 0;</code>
     */
    const QUERY_PRIORITY_UNSPECIFIED = 0;
    /**
     * Query will be executed in BigQuery with interactive priority.
     * More information can be found at
     * https://cloud.google.com/bigquery/docs/running-queries#queries.
     *
     * Generated from protobuf enum <code>INTERACTIVE = 1;</code>
     */
    const INTERACTIVE = 1;
    /**
     * Query will be executed in BigQuery with batch priority.
     * More information can be found at
     * https://cloud.google.com/bigquery/docs/running-queries#batchqueries.
     *
     * Generated from protobuf enum <code>BATCH = 2;</code>
     */
    const BATCH = 2;

    private static $valueToName = [
        self::QUERY_PRIORITY_UNSPECIFIED => 'QUERY_PRIORITY_UNSPECIFIED',
        self::INTERACTIVE => 'INTERACTIVE',
        self::BATCH => 'BATCH',
    ];

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

