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

namespace Google\Cloud\Firestore\V1\Target;

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

/**
 * A target specified by a set of documents names.
 *
 * Generated from protobuf message <code>google.firestore.v1.Target.DocumentsTarget</code>
 */
class DocumentsTarget extends \Google\Protobuf\Internal\Message
{
    /**
     * The names of the documents to retrieve. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     * The request will fail if any of the document is not a child resource of
     * the given `database`. Duplicate names will be elided.
     *
     * Generated from protobuf field <code>repeated string documents = 2;</code>
     */
    private $documents;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[] $documents
     *           The names of the documents to retrieve. In the format:
     *           `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     *           The request will fail if any of the document is not a child resource of
     *           the given `database`. Duplicate names will be elided.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\V1\Firestore::initOnce();
        parent::__construct($data);
    }

    /**
     * The names of the documents to retrieve. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     * The request will fail if any of the document is not a child resource of
     * the given `database`. Duplicate names will be elided.
     *
     * Generated from protobuf field <code>repeated string documents = 2;</code>
     * @return RepeatedField<string>
     */
    public function getDocuments()
    {
        return $this->documents;
    }

    /**
     * The names of the documents to retrieve. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     * The request will fail if any of the document is not a child resource of
     * the given `database`. Duplicate names will be elided.
     *
     * Generated from protobuf field <code>repeated string documents = 2;</code>
     * @param string[] $var
     * @return $this
     */
    public function setDocuments($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->documents = $arr;

        return $this;
    }

}

