Google Cloud Document Ai V1 Client - Class ShardInfo (1.2.2)

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

For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.

Generated from protobuf message google.cloud.documentai.v1.Document.ShardInfo

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ shard_index int|string

The 0-based index of this shard.

↳ shard_count int|string

Total number of shards.

↳ text_offset int|string

The index of the first character in Document.text in the overall document global text.

getShardIndex

The 0-based index of this shard.

Returns
TypeDescription
int|string

setShardIndex

The 0-based index of this shard.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getShardCount

Total number of shards.

Returns
TypeDescription
int|string

setShardCount

Total number of shards.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getTextOffset

The index of the first character in Document.text in the overall document global text.

Returns
TypeDescription
int|string

setTextOffset

The index of the first character in Document.text in the overall document global text.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this