Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock

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

Represents a block. A block could be one of the various types (text, table, list) supported.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock

Returns a new instance of GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock.



4930
4931
4932
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 4930

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

Instance Attribute Details

#block_idString

ID of the block. Corresponds to the JSON property blockId

Returns:

  • (String)


4908
4909
4910
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 4908

def block_id
  @block_id
end

#list_blockGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock

Represents a list type block. Corresponds to the JSON property listBlock



4913
4914
4915
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 4913

def list_block
  @list_block
end

#page_spanGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan

Represents where the block starts and ends in the document. Corresponds to the JSON property pageSpan



4918
4919
4920
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 4918

def page_span
  @page_span
end

#table_blockGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock

Represents a table type block. Corresponds to the JSON property tableBlock



4923
4924
4925
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 4923

def table_block
  @table_block
end

#text_blockGoogle::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock

Represents a text type block. Corresponds to the JSON property textBlock



4928
4929
4930
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 4928

def text_block
  @text_block
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4935
4936
4937
4938
4939
4940
4941
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 4935

def update!(**args)
  @block_id = args[:block_id] if args.key?(:block_id)
  @list_block = args[:list_block] if args.key?(:list_block)
  @page_span = args[:page_span] if args.key?(:page_span)
  @table_block = args[:table_block] if args.key?(:table_block)
  @text_block = args[:text_block] if args.key?(:text_block)
end