Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/documentai_v1/classes.rb,
lib/google/apis/documentai_v1/representations.rb,
lib/google/apis/documentai_v1/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) ⇒ GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock

Returns a new instance of GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlock.



2132
2133
2134
# File 'lib/google/apis/documentai_v1/classes.rb', line 2132

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

Instance Attribute Details

#block_idString

ID of the block. Corresponds to the JSON property blockId

Returns:

  • (String)


2110
2111
2112
# File 'lib/google/apis/documentai_v1/classes.rb', line 2110

def block_id
  @block_id
end

#list_blockGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock

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



2115
2116
2117
# File 'lib/google/apis/documentai_v1/classes.rb', line 2115

def list_block
  @list_block
end

#page_spanGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan

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



2120
2121
2122
# File 'lib/google/apis/documentai_v1/classes.rb', line 2120

def page_span
  @page_span
end

#table_blockGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock

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



2125
2126
2127
# File 'lib/google/apis/documentai_v1/classes.rb', line 2125

def table_block
  @table_block
end

#text_blockGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock

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



2130
2131
2132
# File 'lib/google/apis/documentai_v1/classes.rb', line 2130

def text_block
  @text_block
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2137
2138
2139
2140
2141
2142
2143
# File 'lib/google/apis/documentai_v1/classes.rb', line 2137

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