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

namespace Google\Cloud\Datastream\V1;

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

/**
 * MongoDB Cluster structure.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.MongodbCluster</code>
 */
class MongodbCluster extends \Google\Protobuf\Internal\Message
{
    /**
     * MongoDB databases in the cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datastream.v1.MongodbDatabase databases = 1;</code>
     */
    private $databases;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Datastream\V1\MongodbDatabase[] $databases
     *           MongoDB databases in the cluster.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * MongoDB databases in the cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datastream.v1.MongodbDatabase databases = 1;</code>
     * @return RepeatedField<\Google\Cloud\Datastream\V1\MongodbDatabase>
     */
    public function getDatabases()
    {
        return $this->databases;
    }

    /**
     * MongoDB databases in the cluster.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datastream.v1.MongodbDatabase databases = 1;</code>
     * @param \Google\Cloud\Datastream\V1\MongodbDatabase[] $var
     * @return $this
     */
    public function setDatabases($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Datastream\V1\MongodbDatabase::class);
        $this->databases = $arr;

        return $this;
    }

}

