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

/**
 * 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 array<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk>|\Google\Protobuf\Internal\RepeatedField $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 \Google\Protobuf\Internal\RepeatedField
     */
    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 array<\Google\Cloud\DocumentAI\V1\Document\ChunkedDocument\Chunk>|\Google\Protobuf\Internal\RepeatedField $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;
    }

}


