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

namespace Google\Cloud\Datastream\V1\SourceObjectIdentifier;

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

/**
 * MongoDB data source object identifier.
 *
 * Generated from protobuf message <code>google.cloud.datastream.v1.SourceObjectIdentifier.MongodbObjectIdentifier</code>
 */
class MongodbObjectIdentifier extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The database name.
     *
     * Generated from protobuf field <code>string database = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $database = '';
    /**
     * Required. The collection name.
     *
     * Generated from protobuf field <code>string collection = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $collection = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $database
     *           Required. The database name.
     *     @type string $collection
     *           Required. The collection name.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datastream\V1\DatastreamResources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The database name.
     *
     * Generated from protobuf field <code>string database = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDatabase()
    {
        return $this->database;
    }

    /**
     * Required. The database name.
     *
     * Generated from protobuf field <code>string database = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDatabase($var)
    {
        GPBUtil::checkString($var, True);
        $this->database = $var;

        return $this;
    }

    /**
     * Required. The collection name.
     *
     * Generated from protobuf field <code>string collection = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCollection()
    {
        return $this->collection;
    }

    /**
     * Required. The collection name.
     *
     * Generated from protobuf field <code>string collection = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCollection($var)
    {
        GPBUtil::checkString($var, True);
        $this->collection = $var;

        return $this;
    }

}


