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.



3795
3796
3797
# File 'lib/google/apis/documentai_v1/classes.rb', line 3795

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

Instance Attribute Details

#block_idString

ID of the block. Corresponds to the JSON property blockId

Returns:

  • (String)


3763
3764
3765
# File 'lib/google/apis/documentai_v1/classes.rb', line 3763

def block_id
  @block_id
end

#bounding_boxGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1BoundingPoly

A bounding polygon for the detected image annotation. Corresponds to the JSON property boundingBox



3768
3769
3770
# File 'lib/google/apis/documentai_v1/classes.rb', line 3768

def bounding_box
  @bounding_box
end

#image_blockGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutImageBlock

Represents an image type block. Corresponds to the JSON property imageBlock



3773
3774
3775
# File 'lib/google/apis/documentai_v1/classes.rb', line 3773

def image_block
  @image_block
end

#list_blockGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock

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



3778
3779
3780
# File 'lib/google/apis/documentai_v1/classes.rb', line 3778

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



3783
3784
3785
# File 'lib/google/apis/documentai_v1/classes.rb', line 3783

def page_span
  @page_span
end

#table_blockGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock

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



3788
3789
3790
# File 'lib/google/apis/documentai_v1/classes.rb', line 3788

def table_block
  @table_block
end

#text_blockGoogle::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock

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



3793
3794
3795
# File 'lib/google/apis/documentai_v1/classes.rb', line 3793

def text_block
  @text_block
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3800
3801
3802
3803
3804
3805
3806
3807
3808
# File 'lib/google/apis/documentai_v1/classes.rb', line 3800

def update!(**args)
  @block_id = args[:block_id] if args.key?(:block_id)
  @bounding_box = args[:bounding_box] if args.key?(:bounding_box)
  @image_block = args[:image_block] if args.key?(:image_block)
  @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