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

namespace Google\Cloud\DataCatalog\V1;

use UnexpectedValueException;

/**
 * This enum describes all the systems that manage
 * Taxonomy and PolicyTag resources in DataCatalog.
 *
 * Protobuf type <code>google.cloud.datacatalog.v1.ManagingSystem</code>
 */
class ManagingSystem
{
    /**
     * Default value
     *
     * Generated from protobuf enum <code>MANAGING_SYSTEM_UNSPECIFIED = 0;</code>
     */
    const MANAGING_SYSTEM_UNSPECIFIED = 0;
    /**
     * Dataplex.
     *
     * Generated from protobuf enum <code>MANAGING_SYSTEM_DATAPLEX = 1;</code>
     */
    const MANAGING_SYSTEM_DATAPLEX = 1;
    /**
     * Other
     *
     * Generated from protobuf enum <code>MANAGING_SYSTEM_OTHER = 2;</code>
     */
    const MANAGING_SYSTEM_OTHER = 2;

    private static $valueToName = [
        self::MANAGING_SYSTEM_UNSPECIFIED => 'MANAGING_SYSTEM_UNSPECIFIED',
        self::MANAGING_SYSTEM_DATAPLEX => 'MANAGING_SYSTEM_DATAPLEX',
        self::MANAGING_SYSTEM_OTHER => 'MANAGING_SYSTEM_OTHER',
    ];

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

