Class: Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleAlignmentRule

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

Overview

A rule for checking field alignment. Horizontal alignment checks if fields are on the same row by comparing y-coordinates of bounding box centers, while vertical alignment checks if fields are on the same column by comparing x- coordinates of bounding box centers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleAlignmentRule

Returns a new instance of CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleAlignmentRule.



123
124
125
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 123

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

Instance Attribute Details

#alignment_typeString

Corresponds to the JSON property alignmentType

Returns:

  • (String)


116
117
118
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 116

def alignment_type
  @alignment_type
end

#toleranceFloat

The tolerance to use when comparing coordinates. Corresponds to the JSON property tolerance

Returns:

  • (Float)


121
122
123
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 121

def tolerance
  @tolerance
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



128
129
130
131
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 128

def update!(**args)
  @alignment_type = args[:alignment_type] if args.key?(:alignment_type)
  @tolerance = args[:tolerance] if args.key?(:tolerance)
end