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

namespace Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile;

use UnexpectedValueException;

/**
 * The various consumer groups available in the connection string profile.
 *
 * Protobuf type <code>google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup</code>
 */
class ConsumerGroup
{
    /**
     * Default unspecified value.
     *
     * Generated from protobuf enum <code>CONSUMER_GROUP_UNSPECIFIED = 0;</code>
     */
    const CONSUMER_GROUP_UNSPECIFIED = 0;
    /**
     * High consumer group.
     *
     * Generated from protobuf enum <code>HIGH = 1;</code>
     */
    const HIGH = 1;
    /**
     * Medium consumer group.
     *
     * Generated from protobuf enum <code>MEDIUM = 2;</code>
     */
    const MEDIUM = 2;
    /**
     * Low consumer group.
     *
     * Generated from protobuf enum <code>LOW = 3;</code>
     */
    const LOW = 3;
    /**
     * TP consumer group.
     *
     * Generated from protobuf enum <code>TP = 4;</code>
     */
    const TP = 4;
    /**
     * TPURGENT consumer group.
     *
     * Generated from protobuf enum <code>TPURGENT = 5;</code>
     */
    const TPURGENT = 5;

    private static $valueToName = [
        self::CONSUMER_GROUP_UNSPECIFIED => 'CONSUMER_GROUP_UNSPECIFIED',
        self::HIGH => 'HIGH',
        self::MEDIUM => 'MEDIUM',
        self::LOW => 'LOW',
        self::TP => 'TP',
        self::TPURGENT => 'TPURGENT',
    ];

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


