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

namespace Google\Cloud\Metastore\V1beta\Service;

use UnexpectedValueException;

/**
 * Release channels bundle features of varying levels of stability. Newer
 * features may be introduced initially into less stable release channels and
 * can be automatically promoted into more stable release channels.
 *
 * Protobuf type <code>google.cloud.metastore.v1beta.Service.ReleaseChannel</code>
 */
class ReleaseChannel
{
    /**
     * Release channel is not specified.
     *
     * Generated from protobuf enum <code>RELEASE_CHANNEL_UNSPECIFIED = 0;</code>
     */
    const RELEASE_CHANNEL_UNSPECIFIED = 0;
    /**
     * The `CANARY` release channel contains the newest features, which may be
     * unstable and subject to unresolved issues with no known workarounds.
     * Services using the `CANARY` release channel are not subject to any SLAs.
     *
     * Generated from protobuf enum <code>CANARY = 1;</code>
     */
    const CANARY = 1;
    /**
     * The `STABLE` release channel contains features that are considered stable
     * and have been validated for production use.
     *
     * Generated from protobuf enum <code>STABLE = 2;</code>
     */
    const STABLE = 2;

    private static $valueToName = [
        self::RELEASE_CHANNEL_UNSPECIFIED => 'RELEASE_CHANNEL_UNSPECIFIED',
        self::CANARY => 'CANARY',
        self::STABLE => 'STABLE',
    ];

    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(ReleaseChannel::class, \Google\Cloud\Metastore\V1beta\Service_ReleaseChannel::class);

