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

/**
 * MongoDB source configuration.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.MongodbSourceConfig</code>
 */
class MongodbSourceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * MongoDB collections to include in the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.MongodbCluster include_objects = 1;</code>
     */
    protected $include_objects = null;
    /**
     * MongoDB collections to exclude from the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.MongodbCluster exclude_objects = 2;</code>
     */
    protected $exclude_objects = null;
    /**
     * Optional. Maximum number of concurrent backfill tasks. The number should be
     * non-negative and less than or equal to 50. If not set (or set to 0), the
     * system's default value is used
     *
     * Generated from protobuf field <code>int32 max_concurrent_backfill_tasks = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $max_concurrent_backfill_tasks = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Datastream\V1\MongodbCluster $include_objects
     *           MongoDB collections to include in the stream.
     *     @type \Google\Cloud\Datastream\V1\MongodbCluster $exclude_objects
     *           MongoDB collections to exclude from the stream.
     *     @type int $max_concurrent_backfill_tasks
     *           Optional. Maximum number of concurrent backfill tasks. The number should be
     *           non-negative and less than or equal to 50. If not set (or set to 0), the
     *           system's default value is used
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * MongoDB collections to include in the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.MongodbCluster include_objects = 1;</code>
     * @return \Google\Cloud\Datastream\V1\MongodbCluster|null
     */
    public function getIncludeObjects()
    {
        return $this->include_objects;
    }

    public function hasIncludeObjects()
    {
        return isset($this->include_objects);
    }

    public function clearIncludeObjects()
    {
        unset($this->include_objects);
    }

    /**
     * MongoDB collections to include in the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.MongodbCluster include_objects = 1;</code>
     * @param \Google\Cloud\Datastream\V1\MongodbCluster $var
     * @return $this
     */
    public function setIncludeObjects($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MongodbCluster::class);
        $this->include_objects = $var;

        return $this;
    }

    /**
     * MongoDB collections to exclude from the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.MongodbCluster exclude_objects = 2;</code>
     * @return \Google\Cloud\Datastream\V1\MongodbCluster|null
     */
    public function getExcludeObjects()
    {
        return $this->exclude_objects;
    }

    public function hasExcludeObjects()
    {
        return isset($this->exclude_objects);
    }

    public function clearExcludeObjects()
    {
        unset($this->exclude_objects);
    }

    /**
     * MongoDB collections to exclude from the stream.
     *
     * Generated from protobuf field <code>.google.cloud.datastream.v1.MongodbCluster exclude_objects = 2;</code>
     * @param \Google\Cloud\Datastream\V1\MongodbCluster $var
     * @return $this
     */
    public function setExcludeObjects($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Datastream\V1\MongodbCluster::class);
        $this->exclude_objects = $var;

        return $this;
    }

    /**
     * Optional. Maximum number of concurrent backfill tasks. The number should be
     * non-negative and less than or equal to 50. If not set (or set to 0), the
     * system's default value is used
     *
     * Generated from protobuf field <code>int32 max_concurrent_backfill_tasks = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getMaxConcurrentBackfillTasks()
    {
        return $this->max_concurrent_backfill_tasks;
    }

    /**
     * Optional. Maximum number of concurrent backfill tasks. The number should be
     * non-negative and less than or equal to 50. If not set (or set to 0), the
     * system's default value is used
     *
     * Generated from protobuf field <code>int32 max_concurrent_backfill_tasks = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setMaxConcurrentBackfillTasks($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_concurrent_backfill_tasks = $var;

        return $this;
    }

}

