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

namespace Google\Cloud\Dataplex\V1\DataDocumentationSpec;

use UnexpectedValueException;

/**
 * The data documentation generation scope. This field contains the possible
 * components of a data documentation scan which can be selectively generated.
 *
 * Protobuf type <code>google.cloud.dataplex.v1.DataDocumentationSpec.GenerationScope</code>
 */
class GenerationScope
{
    /**
     * Unspecified generation scope. If no generation scope is specified, all
     * available documentation components will be generated.
     *
     * Generated from protobuf enum <code>GENERATION_SCOPE_UNSPECIFIED = 0;</code>
     */
    const GENERATION_SCOPE_UNSPECIFIED = 0;
    /**
     * All the possible results will be generated.
     *
     * Generated from protobuf enum <code>ALL = 1;</code>
     */
    const ALL = 1;
    /**
     * Table and column descriptions will be generated.
     *
     * Generated from protobuf enum <code>TABLE_AND_COLUMN_DESCRIPTIONS = 2;</code>
     */
    const TABLE_AND_COLUMN_DESCRIPTIONS = 2;
    /**
     * SQL queries will be generated.
     *
     * Generated from protobuf enum <code>SQL_QUERIES = 3;</code>
     */
    const SQL_QUERIES = 3;

    private static $valueToName = [
        self::GENERATION_SCOPE_UNSPECIFIED => 'GENERATION_SCOPE_UNSPECIFIED',
        self::ALL => 'ALL',
        self::TABLE_AND_COLUMN_DESCRIPTIONS => 'TABLE_AND_COLUMN_DESCRIPTIONS',
        self::SQL_QUERIES => 'SQL_QUERIES',
    ];

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

