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

namespace Google\Cloud\Container\V1;

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

/**
 * SoleTenantConfig contains the NodeAffinities to specify what shared sole
 * tenant node groups should back the node pool.
 *
 * Generated from protobuf message <code>google.container.v1.SoleTenantConfig</code>
 */
class SoleTenantConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * NodeAffinities used to match to a shared sole tenant node group.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.SoleTenantConfig.NodeAffinity node_affinities = 1;</code>
     */
    private $node_affinities;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Container\V1\SoleTenantConfig\NodeAffinity>|\Google\Protobuf\Internal\RepeatedField $node_affinities
     *           NodeAffinities used to match to a shared sole tenant node group.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * NodeAffinities used to match to a shared sole tenant node group.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.SoleTenantConfig.NodeAffinity node_affinities = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNodeAffinities()
    {
        return $this->node_affinities;
    }

    /**
     * NodeAffinities used to match to a shared sole tenant node group.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.SoleTenantConfig.NodeAffinity node_affinities = 1;</code>
     * @param array<\Google\Cloud\Container\V1\SoleTenantConfig\NodeAffinity>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNodeAffinities($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\SoleTenantConfig\NodeAffinity::class);
        $this->node_affinities = $arr;

        return $this;
    }

}

