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

namespace Google\Cloud\Channel\V1\EduData;

use UnexpectedValueException;

/**
 * Enum to specify the institute type.
 *
 * Protobuf type <code>google.cloud.channel.v1.EduData.InstituteType</code>
 */
class InstituteType
{
    /**
     * Default value.  This state doesn't show unless an error occurs.
     *
     * Generated from protobuf enum <code>INSTITUTE_TYPE_UNSPECIFIED = 0;</code>
     */
    const INSTITUTE_TYPE_UNSPECIFIED = 0;
    /**
     * Elementary/Secondary Schools & Districts
     *
     * Generated from protobuf enum <code>K12 = 1;</code>
     */
    const K12 = 1;
    /**
     * Higher Education Universities & Colleges
     *
     * Generated from protobuf enum <code>UNIVERSITY = 2;</code>
     */
    const UNIVERSITY = 2;

    private static $valueToName = [
        self::INSTITUTE_TYPE_UNSPECIFIED => 'INSTITUTE_TYPE_UNSPECIFIED',
        self::K12 => 'K12',
        self::UNIVERSITY => 'UNIVERSITY',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InstituteType::class, \Google\Cloud\Channel\V1\EduData_InstituteType::class);

