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

namespace Google\Cloud\DocumentAI\V1\Document;

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

/**
 * Represents the chunks that the document is divided into.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.Document.ChunkedDocument</code>
 */
class ChunkedDocument extends \Google\Protobuf\Internal\Message
{
    /**
     * List of chunks.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1;</code>
     */
    private $chunks;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk[] $chunks
     *           List of chunks.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce();
        parent::__construct($data);
    }

    /**
     * List of chunks.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1;</code>
     * @return RepeatedField<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk>
     */
    public function getChunks()
    {
        return $this->chunks;
    }

    /**
     * List of chunks.
     *
     * Generated from protobuf field <code>repeated .google.cloud.documentai.v1.Document.ChunkedDocument.Chunk chunks = 1;</code>
     * @param \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk[] $var
     * @return $this
     */
    public function setChunks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk::class);
        $this->chunks = $arr;

        return $this;
    }

}

