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

namespace Google\Cloud\GkeMultiCloud\V1;

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

/**
 * AttachedServerConfig provides information about supported
 * Kubernetes versions
 *
 * Generated from protobuf message <code>google.cloud.gkemulticloud.v1.AttachedServerConfig</code>
 */
class AttachedServerConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the config.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * List of valid platform versions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2;</code>
     */
    private $valid_versions;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The resource name of the config.
     *     @type array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $valid_versions
     *           List of valid platform versions.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkemulticloud\V1\AttachedResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the config.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The resource name of the config.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * List of valid platform versions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getValidVersions()
    {
        return $this->valid_versions;
    }

    /**
     * List of valid platform versions.
     *
     * Generated from protobuf field <code>repeated .google.cloud.gkemulticloud.v1.AttachedPlatformVersionInfo valid_versions = 2;</code>
     * @param array<\Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setValidVersions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeMultiCloud\V1\AttachedPlatformVersionInfo::class);
        $this->valid_versions = $arr;

        return $this;
    }

}

