Class: Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock

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 text type block.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock

Returns a new instance of GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock.



5119
5120
5121
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 5119

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

Instance Attribute Details

#blocksArray<Google::Apis::DocumentaiV1beta2::GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock>

A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks. Corresponds to the JSON property blocks



5105
5106
5107
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 5105

def blocks
  @blocks
end

#textString

Text content stored in the block. Corresponds to the JSON property text

Returns:

  • (String)


5110
5111
5112
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 5110

def text
  @text
end

#typeString

Type of the text in the block. Available options are: paragraph, subtitle, heading-1, heading-2, heading-3, heading-4, heading-5, header, footer. Corresponds to the JSON property type

Returns:

  • (String)


5117
5118
5119
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 5117

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5124
5125
5126
5127
5128
# File 'lib/google/apis/documentai_v1beta2/classes.rb', line 5124

def update!(**args)
  @blocks = args[:blocks] if args.key?(:blocks)
  @text = args[:text] if args.key?(:text)
  @type = args[:type] if args.key?(:type)
end