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

namespace Google\Cloud\ManagedKafka\V1;

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

/**
 * The configuration of access to the Kafka cluster.
 *
 * Generated from protobuf message <code>google.cloud.managedkafka.v1.AccessConfig</code>
 */
class AccessConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Virtual Private Cloud (VPC) networks that must be granted direct
     * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10
     * networks can be specified.
     *
     * Generated from protobuf field <code>repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $network_configs;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\ManagedKafka\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $network_configs
     *           Required. Virtual Private Cloud (VPC) networks that must be granted direct
     *           access to the Kafka cluster. Minimum of 1 network is required. Maximum 10
     *           networks can be specified.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. Virtual Private Cloud (VPC) networks that must be granted direct
     * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10
     * networks can be specified.
     *
     * Generated from protobuf field <code>repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNetworkConfigs()
    {
        return $this->network_configs;
    }

    /**
     * Required. Virtual Private Cloud (VPC) networks that must be granted direct
     * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10
     * networks can be specified.
     *
     * Generated from protobuf field <code>repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\ManagedKafka\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNetworkConfigs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\NetworkConfig::class);
        $this->network_configs = $arr;

        return $this;
    }

}

