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

namespace Google\Cloud\Metastore\V1;

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

/**
 * Network configuration for the Dataproc Metastore service.
 *
 * Generated from protobuf message <code>google.cloud.metastore.v1.NetworkConfig</code>
 */
class NetworkConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Immutable. The consumer-side network configuration for the Dataproc Metastore
     * instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $consumers;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\Metastore\V1\NetworkConfig\Consumer>|\Google\Protobuf\Internal\RepeatedField $consumers
     *           Immutable. The consumer-side network configuration for the Dataproc Metastore
     *           instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Metastore\V1\Metastore::initOnce();
        parent::__construct($data);
    }

    /**
     * Immutable. The consumer-side network configuration for the Dataproc Metastore
     * instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getConsumers()
    {
        return $this->consumers;
    }

    /**
     * Immutable. The consumer-side network configuration for the Dataproc Metastore
     * instance.
     *
     * Generated from protobuf field <code>repeated .google.cloud.metastore.v1.NetworkConfig.Consumer consumers = 1 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param array<\Google\Cloud\Metastore\V1\NetworkConfig\Consumer>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setConsumers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Metastore\V1\NetworkConfig\Consumer::class);
        $this->consumers = $arr;

        return $this;
    }

}

