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

namespace Google\Cloud\Container\V1\ServerConfig;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * ReleaseChannelConfig exposes configuration for a release channel.
 *
 * Generated from protobuf message <code>google.container.v1.ServerConfig.ReleaseChannelConfig</code>
 */
class ReleaseChannelConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The release channel this configuration applies to.
     *
     * Generated from protobuf field <code>.google.container.v1.ReleaseChannel.Channel channel = 1;</code>
     */
    private $channel = 0;
    /**
     * The default version for newly created clusters on the channel.
     *
     * Generated from protobuf field <code>string default_version = 2;</code>
     */
    private $default_version = '';
    /**
     * List of valid versions for the channel.
     *
     * Generated from protobuf field <code>repeated string valid_versions = 4;</code>
     */
    private $valid_versions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $channel
     *           The release channel this configuration applies to.
     *     @type string $default_version
     *           The default version for newly created clusters on the channel.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $valid_versions
     *           List of valid versions for the channel.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * The release channel this configuration applies to.
     *
     * Generated from protobuf field <code>.google.container.v1.ReleaseChannel.Channel channel = 1;</code>
     * @return int
     */
    public function getChannel()
    {
        return $this->channel;
    }

    /**
     * The release channel this configuration applies to.
     *
     * Generated from protobuf field <code>.google.container.v1.ReleaseChannel.Channel channel = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setChannel($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\ReleaseChannel\Channel::class);
        $this->channel = $var;

        return $this;
    }

    /**
     * The default version for newly created clusters on the channel.
     *
     * Generated from protobuf field <code>string default_version = 2;</code>
     * @return string
     */
    public function getDefaultVersion()
    {
        return $this->default_version;
    }

    /**
     * The default version for newly created clusters on the channel.
     *
     * Generated from protobuf field <code>string default_version = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDefaultVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->default_version = $var;

        return $this;
    }

    /**
     * List of valid versions for the channel.
     *
     * Generated from protobuf field <code>repeated string valid_versions = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getValidVersions()
    {
        return $this->valid_versions;
    }

    /**
     * List of valid versions for the channel.
     *
     * Generated from protobuf field <code>repeated string valid_versions = 4;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setValidVersions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->valid_versions = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ReleaseChannelConfig::class, \Google\Cloud\Container\V1\ServerConfig_ReleaseChannelConfig::class);

