Google Cloud Document Ai V1 Client - Class Chunk (2.1.1)

Reference documentation and code samples for the Google Cloud Document Ai V1 Client class Chunk.

Represents a chunk.

Generated from protobuf message google.cloud.documentai.v1.Document.ChunkedDocument.Chunk

Namespace

Google \ Cloud \ DocumentAI \ V1 \ Document \ ChunkedDocument

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ chunk_id string

ID of the chunk.

↳ source_block_ids array

Unused.

↳ content string

Text content of the chunk.

↳ page_span Chunk\ChunkPageSpan

Page span of the chunk.

↳ page_headers array<Chunk\ChunkPageHeader>

Page headers associated with the chunk.

↳ page_footers array<Chunk\ChunkPageFooter>

Page footers associated with the chunk.

getChunkId

ID of the chunk.

Returns
Type Description
string

setChunkId

ID of the chunk.

Parameter
Name Description
var string
Returns
Type Description
$this

getSourceBlockIds

Unused.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setSourceBlockIds

Unused.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getContent

Text content of the chunk.

Returns
Type Description
string

setContent

Text content of the chunk.

Parameter
Name Description
var string
Returns
Type Description
$this

getPageSpan

Page span of the chunk.

Returns
Type Description
Chunk\ChunkPageSpan|null

hasPageSpan

clearPageSpan

setPageSpan

Page span of the chunk.

Parameter
Name Description
var Chunk\ChunkPageSpan
Returns
Type Description
$this

getPageHeaders

Page headers associated with the chunk.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPageHeaders

Page headers associated with the chunk.

Parameter
Name Description
var array<Chunk\ChunkPageHeader>
Returns
Type Description
$this

getPageFooters

Page footers associated with the chunk.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setPageFooters

Page footers associated with the chunk.

Parameter
Name Description
var array<Chunk\ChunkPageFooter>
Returns
Type Description
$this