<?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\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Network configuration for the Dataproc Metastore service.
 * Next available ID: 4
 *
 * 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 \Google\Cloud\Metastore\V1\NetworkConfig\Consumer[] $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 RepeatedField<\Google\Cloud\Metastore\V1\NetworkConfig\Consumer>
     */
    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 \Google\Cloud\Metastore\V1\NetworkConfig\Consumer[] $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;
    }

}

