Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta1DocumentShardInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1beta2/classes.rb,
lib/google/apis/documentai_v1beta2/representations.rb,
lib/google/apis/documentai_v1beta2/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta1DocumentShardInfo

Returns a new instance of GoogleCloudDocumentaiV1beta1DocumentShardInfo.



2518
2519
2520
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2518

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#shard_countFixnum

Total number of shards. Corresponds to the JSON property shardCount

Returns:

  • (Fixnum)


2505
2506
2507
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2505

def shard_count
  @shard_count
end

#shard_indexFixnum

The 0-based index of this shard. Corresponds to the JSON property shardIndex

Returns:

  • (Fixnum)


2510
2511
2512
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2510

def shard_index
  @shard_index
end

#text_offsetFixnum

The index of the first character in Document.text in the overall document global text. Corresponds to the JSON property textOffset

Returns:

  • (Fixnum)


2516
2517
2518
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2516

def text_offset
  @text_offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2523
2524
2525
2526
2527
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 2523

def update!(**args)
  @shard_count = args[:shard_count] if args.key?(:shard_count)
  @shard_index = args[:shard_index] if args.key?(:shard_index)
  @text_offset = args[:text_offset] if args.key?(:text_offset)
end