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

namespace Google\Cloud\BigQuery\AnalyticsHub\V1\StoredProcedureConfig;

use UnexpectedValueException;

/**
 * Enum to specify the type of stored procedure to share.
 *
 * Protobuf type <code>google.cloud.bigquery.analyticshub.v1.StoredProcedureConfig.StoredProcedureType</code>
 */
class StoredProcedureType
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>STORED_PROCEDURE_TYPE_UNSPECIFIED = 0;</code>
     */
    const STORED_PROCEDURE_TYPE_UNSPECIFIED = 0;
    /**
     * SQL stored procedure.
     *
     * Generated from protobuf enum <code>SQL_PROCEDURE = 1;</code>
     */
    const SQL_PROCEDURE = 1;

    private static $valueToName = [
        self::STORED_PROCEDURE_TYPE_UNSPECIFIED => 'STORED_PROCEDURE_TYPE_UNSPECIFIED',
        self::SQL_PROCEDURE => 'SQL_PROCEDURE',
    ];

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


