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

namespace Google\Cloud\DataCatalog\V1;

use UnexpectedValueException;

/**
 * Entry resources in Data Catalog can be of different types e.g. a BigQuery
 * Table entry is of type `TABLE`. This enum describes all the possible types
 * Data Catalog contains.
 *
 * Protobuf type <code>google.cloud.datacatalog.v1.EntryType</code>
 */
class EntryType
{
    /**
     * Default unknown type.
     *
     * Generated from protobuf enum <code>ENTRY_TYPE_UNSPECIFIED = 0;</code>
     */
    const ENTRY_TYPE_UNSPECIFIED = 0;
    /**
     * Output only. The type of entry that has a GoogleSQL schema, including
     * logical views.
     *
     * Generated from protobuf enum <code>TABLE = 2;</code>
     */
    const TABLE = 2;
    /**
     * Output only. The type of models, examples include
     * https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro
     *
     * Generated from protobuf enum <code>MODEL = 5;</code>
     */
    const MODEL = 5;
    /**
     * Output only. An entry type which is used for streaming entries. Example:
     * Pub/Sub topic.
     *
     * Generated from protobuf enum <code>DATA_STREAM = 3;</code>
     */
    const DATA_STREAM = 3;
    /**
     * An entry type which is a set of files or objects. Example:
     * Cloud Storage fileset.
     *
     * Generated from protobuf enum <code>FILESET = 4;</code>
     */
    const FILESET = 4;

    private static $valueToName = [
        self::ENTRY_TYPE_UNSPECIFIED => 'ENTRY_TYPE_UNSPECIFIED',
        self::TABLE => 'TABLE',
        self::MODEL => 'MODEL',
        self::DATA_STREAM => 'DATA_STREAM',
        self::FILESET => 'FILESET',
    ];

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

