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

namespace Google\Cloud\RapidMigrationAssessment\V1\Annotation;

use UnexpectedValueException;

/**
 * Types for project level setting.
 *
 * Protobuf type <code>google.cloud.rapidmigrationassessment.v1.Annotation.Type</code>
 */
class Type
{
    /**
     * Unknown type
     *
     * Generated from protobuf enum <code>TYPE_UNSPECIFIED = 0;</code>
     */
    const TYPE_UNSPECIFIED = 0;
    /**
     * Indicates that this project has opted into StratoZone export.
     *
     * Generated from protobuf enum <code>TYPE_LEGACY_EXPORT_CONSENT = 1;</code>
     */
    const TYPE_LEGACY_EXPORT_CONSENT = 1;
    /**
     * Indicates that this project is created by Qwiklab.
     *
     * Generated from protobuf enum <code>TYPE_QWIKLAB = 2;</code>
     */
    const TYPE_QWIKLAB = 2;

    private static $valueToName = [
        self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED',
        self::TYPE_LEGACY_EXPORT_CONSENT => 'TYPE_LEGACY_EXPORT_CONSENT',
        self::TYPE_QWIKLAB => 'TYPE_QWIKLAB',
    ];

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


