@@ -22,6 +22,239 @@ module Google
2222 module Apis
2323 module DocumentaiV1beta3
2424
25+ # Definition of the validation rules. Those are the input to the validator logic
26+ # and they are used to validate a document.
27+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInput
28+ include Google ::Apis ::Core ::Hashable
29+
30+ #
31+ # Corresponds to the JSON property `validationRules`
32+ # @return [Array<Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule>]
33+ attr_accessor :validation_rules
34+
35+ def initialize ( **args )
36+ update! ( **args )
37+ end
38+
39+ # Update properties of this object
40+ def update! ( **args )
41+ @validation_rules = args [ :validation_rules ] if args . key? ( :validation_rules )
42+ end
43+ end
44+
45+ #
46+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRule
47+ include Google ::Apis ::Core ::Hashable
48+
49+ # Description of the validation rule. This has no use but for documentation
50+ # Corresponds to the JSON property `description`
51+ # @return [String]
52+ attr_accessor :description
53+
54+ #
55+ # Corresponds to the JSON property `fieldOccurrences`
56+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFieldOccurrences]
57+ attr_accessor :field_occurrences
58+
59+ #
60+ # Corresponds to the JSON property `fieldRegex`
61+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFieldRegex]
62+ attr_accessor :field_regex
63+
64+ #
65+ # Corresponds to the JSON property `formValidation`
66+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidation]
67+ attr_accessor :form_validation
68+
69+ # Name of the validation rule.
70+ # Corresponds to the JSON property `name`
71+ # @return [String]
72+ attr_accessor :name
73+
74+ def initialize ( **args )
75+ update! ( **args )
76+ end
77+
78+ # Update properties of this object
79+ def update! ( **args )
80+ @description = args [ :description ] if args . key? ( :description )
81+ @field_occurrences = args [ :field_occurrences ] if args . key? ( :field_occurrences )
82+ @field_regex = args [ :field_regex ] if args . key? ( :field_regex )
83+ @form_validation = args [ :form_validation ] if args . key? ( :form_validation )
84+ @name = args [ :name ] if args . key? ( :name )
85+ end
86+ end
87+
88+ # The constant value used in the validation rules.
89+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleConstant
90+ include Google ::Apis ::Core ::Hashable
91+
92+ #
93+ # Corresponds to the JSON property `floatValue`
94+ # @return [Float]
95+ attr_accessor :float_value
96+
97+ def initialize ( **args )
98+ update! ( **args )
99+ end
100+
101+ # Update properties of this object
102+ def update! ( **args )
103+ @float_value = args [ :float_value ] if args . key? ( :float_value )
104+ end
105+ end
106+
107+ #
108+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleField
109+ include Google ::Apis ::Core ::Hashable
110+
111+ # The constant value used in the validation rules.
112+ # Corresponds to the JSON property `defaultValue`
113+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleConstant]
114+ attr_accessor :default_value
115+
116+ # The field name to validate. This can be a simple field name or a nested field
117+ # one using the ':' (meant as an aggregator) or '*' (meant as foreach) operators.
118+ # Corresponds to the JSON property `fieldName`
119+ # @return [String]
120+ attr_accessor :field_name
121+
122+ def initialize ( **args )
123+ update! ( **args )
124+ end
125+
126+ # Update properties of this object
127+ def update! ( **args )
128+ @default_value = args [ :default_value ] if args . key? ( :default_value )
129+ @field_name = args [ :field_name ] if args . key? ( :field_name )
130+ end
131+ end
132+
133+ #
134+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFieldOccurrences
135+ include Google ::Apis ::Core ::Hashable
136+
137+ #
138+ # Corresponds to the JSON property `field`
139+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleField]
140+ attr_accessor :field
141+
142+ #
143+ # Corresponds to the JSON property `maxOccurrences`
144+ # @return [Fixnum]
145+ attr_accessor :max_occurrences
146+
147+ # Min and max occurrences of the field. If not set, there is limit set. The
148+ # defined interval is a closed-closed interval, i.e. [min, max].
149+ # Corresponds to the JSON property `minOccurrences`
150+ # @return [Fixnum]
151+ attr_accessor :min_occurrences
152+
153+ def initialize ( **args )
154+ update! ( **args )
155+ end
156+
157+ # Update properties of this object
158+ def update! ( **args )
159+ @field = args [ :field ] if args . key? ( :field )
160+ @max_occurrences = args [ :max_occurrences ] if args . key? ( :max_occurrences )
161+ @min_occurrences = args [ :min_occurrences ] if args . key? ( :min_occurrences )
162+ end
163+ end
164+
165+ #
166+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFieldRegex
167+ include Google ::Apis ::Core ::Hashable
168+
169+ #
170+ # Corresponds to the JSON property `field`
171+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleField]
172+ attr_accessor :field
173+
174+ # Python regex to validate the field values.
175+ # Corresponds to the JSON property `pattern`
176+ # @return [String]
177+ attr_accessor :pattern
178+
179+ def initialize ( **args )
180+ update! ( **args )
181+ end
182+
183+ # Update properties of this object
184+ def update! ( **args )
185+ @field = args [ :field ] if args . key? ( :field )
186+ @pattern = args [ :pattern ] if args . key? ( :pattern )
187+ end
188+ end
189+
190+ #
191+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidation
192+ include Google ::Apis ::Core ::Hashable
193+
194+ #
195+ # Corresponds to the JSON property `leftOperand`
196+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidationOperation]
197+ attr_accessor :left_operand
198+
199+ #
200+ # Corresponds to the JSON property `rightOperand`
201+ # @return [Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidationOperation]
202+ attr_accessor :right_operand
203+
204+ # The relational operator to be applied to the operands.
205+ # Corresponds to the JSON property `validationOperator`
206+ # @return [String]
207+ attr_accessor :validation_operator
208+
209+ def initialize ( **args )
210+ update! ( **args )
211+ end
212+
213+ # Update properties of this object
214+ def update! ( **args )
215+ @left_operand = args [ :left_operand ] if args . key? ( :left_operand )
216+ @right_operand = args [ :right_operand ] if args . key? ( :right_operand )
217+ @validation_operator = args [ :validation_operator ] if args . key? ( :validation_operator )
218+ end
219+ end
220+
221+ #
222+ class CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidationOperation
223+ include Google ::Apis ::Core ::Hashable
224+
225+ # A list of constants to be used as operands.
226+ # Corresponds to the JSON property `constants`
227+ # @return [Array<Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleConstant>]
228+ attr_accessor :constants
229+
230+ # A list of fields to be used as operands.
231+ # Corresponds to the JSON property `fields`
232+ # @return [Array<Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleField>]
233+ attr_accessor :fields
234+
235+ # The operation type to be applied to all the operands.
236+ # Corresponds to the JSON property `operationType`
237+ # @return [String]
238+ attr_accessor :operation_type
239+
240+ # A list of recursive operations to be used as operands.
241+ # Corresponds to the JSON property `operations`
242+ # @return [Array<Google::Apis::DocumentaiV1beta3::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidationOperation>]
243+ attr_accessor :operations
244+
245+ def initialize ( **args )
246+ update! ( **args )
247+ end
248+
249+ # Update properties of this object
250+ def update! ( **args )
251+ @constants = args [ :constants ] if args . key? ( :constants )
252+ @fields = args [ :fields ] if args . key? ( :fields )
253+ @operation_type = args [ :operation_type ] if args . key? ( :operation_type )
254+ @operations = args [ :operations ] if args . key? ( :operations )
255+ end
256+ end
257+
25258 # Metadata of the auto-labeling documents operation.
26259 class GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata
27260 include Google ::Apis ::Core ::Hashable
@@ -2882,12 +3115,6 @@ class GoogleCloudDocumentaiV1beta3Document
28823115 # @return [String]
28833116 attr_accessor :uri
28843117
2885- # The output of the validation given the document and the validation rules. The
2886- # output is appended to the document in the processing order.
2887- # Corresponds to the JSON property `validationOutputs`
2888- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentValidationOutput>]
2889- attr_accessor :validation_outputs
2890-
28913118 def initialize ( **args )
28923119 update! ( **args )
28933120 end
@@ -2910,7 +3137,6 @@ def update!(**args)
29103137 @text_changes = args [ :text_changes ] if args . key? ( :text_changes )
29113138 @text_styles = args [ :text_styles ] if args . key? ( :text_styles )
29123139 @uri = args [ :uri ] if args . key? ( :uri )
2913- @validation_outputs = args [ :validation_outputs ] if args . key? ( :validation_outputs )
29143140 end
29153141 end
29163142
@@ -5665,70 +5891,6 @@ def update!(**args)
56655891 end
56665892 end
56675893
5668- # The output of the validation given the document and the validation rules.
5669- class GoogleCloudDocumentaiV1beta3DocumentValidationOutput
5670- include Google ::Apis ::Core ::Hashable
5671-
5672- # The overall result of the validation, true if all applicable rules are valid.
5673- # Corresponds to the JSON property `passAllRules`
5674- # @return [Boolean]
5675- attr_accessor :pass_all_rules
5676- alias_method :pass_all_rules? , :pass_all_rules
5677-
5678- # The result of each validation rule.
5679- # Corresponds to the JSON property `validationResults`
5680- # @return [Array<Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult>]
5681- attr_accessor :validation_results
5682-
5683- def initialize ( **args )
5684- update! ( **args )
5685- end
5686-
5687- # Update properties of this object
5688- def update! ( **args )
5689- @pass_all_rules = args [ :pass_all_rules ] if args . key? ( :pass_all_rules )
5690- @validation_results = args [ :validation_results ] if args . key? ( :validation_results )
5691- end
5692- end
5693-
5694- # Validation result for a single validation rule.
5695- class GoogleCloudDocumentaiV1beta3DocumentValidationOutputValidationResult
5696- include Google ::Apis ::Core ::Hashable
5697-
5698- # The description of the validation rule.
5699- # Corresponds to the JSON property `ruleDescription`
5700- # @return [String]
5701- attr_accessor :rule_description
5702-
5703- # The name of the validation rule.
5704- # Corresponds to the JSON property `ruleName`
5705- # @return [String]
5706- attr_accessor :rule_name
5707-
5708- # The detailed information of the running the validation process using the
5709- # entity from the document based on the validation rule.
5710- # Corresponds to the JSON property `validationDetails`
5711- # @return [String]
5712- attr_accessor :validation_details
5713-
5714- # The result of the validation rule.
5715- # Corresponds to the JSON property `validationResultType`
5716- # @return [String]
5717- attr_accessor :validation_result_type
5718-
5719- def initialize ( **args )
5720- update! ( **args )
5721- end
5722-
5723- # Update properties of this object
5724- def update! ( **args )
5725- @rule_description = args [ :rule_description ] if args . key? ( :rule_description )
5726- @rule_name = args [ :rule_name ] if args . key? ( :rule_name )
5727- @validation_details = args [ :validation_details ] if args . key? ( :validation_details )
5728- @validation_result_type = args [ :validation_result_type ] if args . key? ( :validation_result_type )
5729- end
5730- end
5731-
57325894 # The long-running operation metadata for the EnableProcessor method.
57335895 class GoogleCloudDocumentaiV1beta3EnableProcessorMetadata
57345896 include Google ::Apis ::Core ::Hashable
0 commit comments