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

namespace Google\Cloud\Container\V1\GatewayAPIConfig;

use UnexpectedValueException;

/**
 * Channel describes if/how Gateway API should be installed and implemented in
 * a cluster.
 *
 * Protobuf type <code>google.container.v1.GatewayAPIConfig.Channel</code>
 */
class Channel
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>CHANNEL_UNSPECIFIED = 0;</code>
     */
    const CHANNEL_UNSPECIFIED = 0;
    /**
     * Gateway API support is disabled
     *
     * Generated from protobuf enum <code>CHANNEL_DISABLED = 1;</code>
     */
    const CHANNEL_DISABLED = 1;
    /**
     * Gateway API support is enabled, experimental CRDs are installed
     *
     * Generated from protobuf enum <code>CHANNEL_EXPERIMENTAL = 3;</code>
     */
    const CHANNEL_EXPERIMENTAL = 3;
    /**
     * Gateway API support is enabled, standard CRDs are installed
     *
     * Generated from protobuf enum <code>CHANNEL_STANDARD = 4;</code>
     */
    const CHANNEL_STANDARD = 4;

    private static $valueToName = [
        self::CHANNEL_UNSPECIFIED => 'CHANNEL_UNSPECIFIED',
        self::CHANNEL_DISABLED => 'CHANNEL_DISABLED',
        self::CHANNEL_EXPERIMENTAL => 'CHANNEL_EXPERIMENTAL',
        self::CHANNEL_STANDARD => 'CHANNEL_STANDARD',
    ];

    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(Channel::class, \Google\Cloud\Container\V1\GatewayAPIConfig_Channel::class);

