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

namespace Google\Cloud\Metastore\V1alpha\Service;

use UnexpectedValueException;

/**
 * Available service tiers.
 *
 * Protobuf type <code>google.cloud.metastore.v1alpha.Service.Tier</code>
 */
class Tier
{
    /**
     * The tier is not set.
     *
     * Generated from protobuf enum <code>TIER_UNSPECIFIED = 0;</code>
     */
    const TIER_UNSPECIFIED = 0;
    /**
     * The developer tier provides limited scalability and no fault tolerance.
     * Good for low-cost proof-of-concept.
     *
     * Generated from protobuf enum <code>DEVELOPER = 1;</code>
     */
    const DEVELOPER = 1;
    /**
     * The enterprise tier provides multi-zone high availability, and sufficient
     * scalability for enterprise-level Dataproc Metastore workloads.
     *
     * Generated from protobuf enum <code>ENTERPRISE = 3;</code>
     */
    const ENTERPRISE = 3;

    private static $valueToName = [
        self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED',
        self::DEVELOPER => 'DEVELOPER',
        self::ENTERPRISE => 'ENTERPRISE',
    ];

    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(Tier::class, \Google\Cloud\Metastore\V1alpha\Service_Tier::class);

