@@ -22,6 +22,239 @@ module Google
2222 module Apis
2323 module DocumentaiV1
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::DocumentaiV1::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::DocumentaiV1::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFieldOccurrences]
57+ attr_accessor :field_occurrences
58+
59+ #
60+ # Corresponds to the JSON property `fieldRegex`
61+ # @return [Google::Apis::DocumentaiV1::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFieldRegex]
62+ attr_accessor :field_regex
63+
64+ #
65+ # Corresponds to the JSON property `formValidation`
66+ # @return [Google::Apis::DocumentaiV1::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::DocumentaiV1::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::DocumentaiV1::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::DocumentaiV1::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::DocumentaiV1::CloudAiDocumentaiLabHifiaToolsValidationValidatorInputValidationRuleFormValidationOperation]
197+ attr_accessor :left_operand
198+
199+ #
200+ # Corresponds to the JSON property `rightOperand`
201+ # @return [Google::Apis::DocumentaiV1::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::DocumentaiV1::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::DocumentaiV1::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::DocumentaiV1::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
@@ -1918,12 +2151,6 @@ class GoogleCloudDocumentaiV1Document
19182151 # @return [String]
19192152 attr_accessor :uri
19202153
1921- # The output of the validation given the document and the validation rules. The
1922- # output is appended to the document in the processing order.
1923- # Corresponds to the JSON property `validationOutputs`
1924- # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentValidationOutput>]
1925- attr_accessor :validation_outputs
1926-
19272154 def initialize ( **args )
19282155 update! ( **args )
19292156 end
@@ -1945,7 +2172,6 @@ def update!(**args)
19452172 @text_changes = args [ :text_changes ] if args . key? ( :text_changes )
19462173 @text_styles = args [ :text_styles ] if args . key? ( :text_styles )
19472174 @uri = args [ :uri ] if args . key? ( :uri )
1948- @validation_outputs = args [ :validation_outputs ] if args . key? ( :validation_outputs )
19492175 end
19502176 end
19512177
@@ -4342,70 +4568,6 @@ def update!(**args)
43424568 end
43434569 end
43444570
4345- # The output of the validation given the document and the validation rules.
4346- class GoogleCloudDocumentaiV1DocumentValidationOutput
4347- include Google ::Apis ::Core ::Hashable
4348-
4349- # The overall result of the validation, true if all applicable rules are valid.
4350- # Corresponds to the JSON property `passAllRules`
4351- # @return [Boolean]
4352- attr_accessor :pass_all_rules
4353- alias_method :pass_all_rules? , :pass_all_rules
4354-
4355- # The result of each validation rule.
4356- # Corresponds to the JSON property `validationResults`
4357- # @return [Array<Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult>]
4358- attr_accessor :validation_results
4359-
4360- def initialize ( **args )
4361- update! ( **args )
4362- end
4363-
4364- # Update properties of this object
4365- def update! ( **args )
4366- @pass_all_rules = args [ :pass_all_rules ] if args . key? ( :pass_all_rules )
4367- @validation_results = args [ :validation_results ] if args . key? ( :validation_results )
4368- end
4369- end
4370-
4371- # Validation result for a single validation rule.
4372- class GoogleCloudDocumentaiV1DocumentValidationOutputValidationResult
4373- include Google ::Apis ::Core ::Hashable
4374-
4375- # The description of the validation rule.
4376- # Corresponds to the JSON property `ruleDescription`
4377- # @return [String]
4378- attr_accessor :rule_description
4379-
4380- # The name of the validation rule.
4381- # Corresponds to the JSON property `ruleName`
4382- # @return [String]
4383- attr_accessor :rule_name
4384-
4385- # The detailed information of the running the validation process using the
4386- # entity from the document based on the validation rule.
4387- # Corresponds to the JSON property `validationDetails`
4388- # @return [String]
4389- attr_accessor :validation_details
4390-
4391- # The result of the validation rule.
4392- # Corresponds to the JSON property `validationResultType`
4393- # @return [String]
4394- attr_accessor :validation_result_type
4395-
4396- def initialize ( **args )
4397- update! ( **args )
4398- end
4399-
4400- # Update properties of this object
4401- def update! ( **args )
4402- @rule_description = args [ :rule_description ] if args . key? ( :rule_description )
4403- @rule_name = args [ :rule_name ] if args . key? ( :rule_name )
4404- @validation_details = args [ :validation_details ] if args . key? ( :validation_details )
4405- @validation_result_type = args [ :validation_result_type ] if args . key? ( :validation_result_type )
4406- end
4407- end
4408-
44094571 # The long-running operation metadata for the EnableProcessor method.
44104572 class GoogleCloudDocumentaiV1EnableProcessorMetadata
44114573 include Google ::Apis ::Core ::Hashable
0 commit comments