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

namespace Google\Cloud\Container\V1\ReleaseChannel;

use UnexpectedValueException;

/**
 * Possible values for 'channel'.
 *
 * Protobuf type <code>google.container.v1.ReleaseChannel.Channel</code>
 */
class Channel
{
    /**
     * No channel specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * RAPID channel is offered on an early access basis for customers who want
     * to test new releases.
     * WARNING: Versions available in the RAPID Channel may be subject to
     * unresolved issues with no known workaround and are not subject to any
     * SLAs.
     *
     * Generated from protobuf enum <code>RAPID = 1;</code>
     */
    const RAPID = 1;
    /**
     * Clusters subscribed to REGULAR receive versions that are considered GA
     * quality. REGULAR is intended for production users who want to take
     * advantage of new features.
     *
     * Generated from protobuf enum <code>REGULAR = 2;</code>
     */
    const REGULAR = 2;
    /**
     * Clusters subscribed to STABLE receive versions that are known to be
     * stable and reliable in production.
     *
     * Generated from protobuf enum <code>STABLE = 3;</code>
     */
    const STABLE = 3;
    /**
     * Clusters subscribed to EXTENDED receive extended support and availability
     * for versions which are known to be stable and reliable in production.
     *
     * Generated from protobuf enum <code>EXTENDED = 4;</code>
     */
    const EXTENDED = 4;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::RAPID => 'RAPID',
        self::REGULAR => 'REGULAR',
        self::STABLE => 'STABLE',
        self::EXTENDED => 'EXTENDED',
    ];

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


