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

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.

Generated from protobuf field int64 shard_index = 1;

Returns
TypeDescription
int|string

setShardIndex

The 0-based index of this shard.

Generated from protobuf field int64 shard_index = 1;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getShardCount

Total number of shards.

Generated from protobuf field int64 shard_count = 2;

Returns
TypeDescription
int|string

setShardCount

Total number of shards.

Generated from protobuf field int64 shard_count = 2;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getTextOffset

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

Generated from protobuf field int64 text_offset = 3;

Returns
TypeDescription
int|string

setTextOffset

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

Generated from protobuf field int64 text_offset = 3;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this