2525from regula .documentreader .webclient .gen .models .images_result import ImagesResult
2626from regula .documentreader .webclient .gen .models .lexical_analysis_result import LexicalAnalysisResult
2727from regula .documentreader .webclient .gen .models .license_result import LicenseResult
28+ from regula .documentreader .webclient .gen .models .mdl_result import MDLResult
2829from regula .documentreader .webclient .gen .models .mrz_detector_result import MRZDetectorResult
2930from regula .documentreader .webclient .gen .models .mrz_position_result import MRZPositionResult
3031from regula .documentreader .webclient .gen .models .mrz_test_quality_result import MRZTestQualityResult
3940from typing import Union , List , Set , Optional , Dict
4041from typing_extensions import Literal , Self
4142
42- CONTAINERLISTLISTINNER_ONE_OF_SCHEMAS = ["AuthenticityResult" , "BarcodePositionResult" , "ByteArrayResult" , "ChosenDocumentTypeResult" , "DocBarCodeInfo" , "DocumentBinaryInfoResult" , "DocumentImageResult" , "DocumentPositionResult" , "DocumentTypesCandidatesResult" , "EncryptedRCLResult" , "FaceDetectionResult" , "GraphicsResult" , "ImageQualityResult" , "ImagesResult" , "LexicalAnalysisResult" , "LicenseResult" , "MRZDetectorResult" , "MRZPositionResult" , "MRZTestQualityResult" , "RFIDGraphicsInfoResult" , "RFIDTextDataResult" , "StatusResult" , "TextDataResult" , "TextResult" , "VDSDataResult" , "VDSNCDataResult" ]
43+ CONTAINERLISTLISTINNER_ONE_OF_SCHEMAS = ["AuthenticityResult" , "BarcodePositionResult" , "ByteArrayResult" , "ChosenDocumentTypeResult" , "DocBarCodeInfo" , "DocumentBinaryInfoResult" , "DocumentImageResult" , "DocumentPositionResult" , "DocumentTypesCandidatesResult" , "EncryptedRCLResult" , "FaceDetectionResult" , "GraphicsResult" , "ImageQualityResult" , "ImagesResult" , "LexicalAnalysisResult" , "LicenseResult" , "MDLResult" , " MRZDetectorResult" , "MRZPositionResult" , "MRZTestQualityResult" , "RFIDGraphicsInfoResult" , "RFIDTextDataResult" , "StatusResult" , "TextDataResult" , "TextResult" , "VDSDataResult" , "VDSNCDataResult" ]
4344
4445class ContainerListListInner (BaseModel ):
4546 """
@@ -97,8 +98,10 @@ class ContainerListListInner(BaseModel):
9798 oneof_schema_25_validator : Optional [VDSNCDataResult ] = None
9899 # data type: VDSDataResult
99100 oneof_schema_26_validator : Optional [VDSDataResult ] = None
100- actual_instance : Optional [Union [AuthenticityResult , BarcodePositionResult , ByteArrayResult , ChosenDocumentTypeResult , DocBarCodeInfo , DocumentBinaryInfoResult , DocumentImageResult , DocumentPositionResult , DocumentTypesCandidatesResult , EncryptedRCLResult , FaceDetectionResult , GraphicsResult , ImageQualityResult , ImagesResult , LexicalAnalysisResult , LicenseResult , MRZDetectorResult , MRZPositionResult , MRZTestQualityResult , RFIDGraphicsInfoResult , RFIDTextDataResult , StatusResult , TextDataResult , TextResult , VDSDataResult , VDSNCDataResult ]] = None
101- one_of_schemas : Set [str ] = { "AuthenticityResult" , "BarcodePositionResult" , "ByteArrayResult" , "ChosenDocumentTypeResult" , "DocBarCodeInfo" , "DocumentBinaryInfoResult" , "DocumentImageResult" , "DocumentPositionResult" , "DocumentTypesCandidatesResult" , "EncryptedRCLResult" , "FaceDetectionResult" , "GraphicsResult" , "ImageQualityResult" , "ImagesResult" , "LexicalAnalysisResult" , "LicenseResult" , "MRZDetectorResult" , "MRZPositionResult" , "MRZTestQualityResult" , "RFIDGraphicsInfoResult" , "RFIDTextDataResult" , "StatusResult" , "TextDataResult" , "TextResult" , "VDSDataResult" , "VDSNCDataResult" }
101+ # data type: MDLResult
102+ oneof_schema_27_validator : Optional [MDLResult ] = None
103+ actual_instance : Optional [Union [AuthenticityResult , BarcodePositionResult , ByteArrayResult , ChosenDocumentTypeResult , DocBarCodeInfo , DocumentBinaryInfoResult , DocumentImageResult , DocumentPositionResult , DocumentTypesCandidatesResult , EncryptedRCLResult , FaceDetectionResult , GraphicsResult , ImageQualityResult , ImagesResult , LexicalAnalysisResult , LicenseResult , MDLResult , MRZDetectorResult , MRZPositionResult , MRZTestQualityResult , RFIDGraphicsInfoResult , RFIDTextDataResult , StatusResult , TextDataResult , TextResult , VDSDataResult , VDSNCDataResult ]] = None
104+ one_of_schemas : Set [str ] = { "AuthenticityResult" , "BarcodePositionResult" , "ByteArrayResult" , "ChosenDocumentTypeResult" , "DocBarCodeInfo" , "DocumentBinaryInfoResult" , "DocumentImageResult" , "DocumentPositionResult" , "DocumentTypesCandidatesResult" , "EncryptedRCLResult" , "FaceDetectionResult" , "GraphicsResult" , "ImageQualityResult" , "ImagesResult" , "LexicalAnalysisResult" , "LicenseResult" , "MDLResult" , "MRZDetectorResult" , "MRZPositionResult" , "MRZTestQualityResult" , "RFIDGraphicsInfoResult" , "RFIDTextDataResult" , "StatusResult" , "TextDataResult" , "TextResult" , "VDSDataResult" , "VDSNCDataResult" }
102105
103106 model_config = ConfigDict (
104107 validate_assignment = True ,
@@ -254,12 +257,17 @@ def actual_instance_must_validate_oneof(cls, v):
254257 error_messages .append (f"Error! Input type `{ type (v )} ` is not `VDSDataResult`" )
255258 else :
256259 match += 1
260+ # validate data type: MDLResult
261+ if not isinstance (v , MDLResult ):
262+ error_messages .append (f"Error! Input type `{ type (v )} ` is not `MDLResult`" )
263+ else :
264+ match += 1
257265 if match > 1 :
258266 # more than 1 match
259- raise ValueError ("Multiple matches found when setting `actual_instance` in ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
267+ raise ValueError ("Multiple matches found when setting `actual_instance` in ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MDLResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
260268 elif match == 0 :
261269 # no match
262- raise ValueError ("No match found when setting `actual_instance` in ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
270+ raise ValueError ("No match found when setting `actual_instance` in ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MDLResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
263271 else :
264272 return v
265273
@@ -430,13 +438,19 @@ def from_json(cls, json_str: str) -> Self:
430438 match += 1
431439 except (ValidationError , ValueError ) as e :
432440 error_messages .append (str (e ))
441+ # deserialize data into MDLResult
442+ try :
443+ instance .actual_instance = MDLResult .from_json (json_str )
444+ match += 1
445+ except (ValidationError , ValueError ) as e :
446+ error_messages .append (str (e ))
433447
434448 if match > 1 :
435449 # more than 1 match
436- raise ValueError ("Multiple matches found when deserializing the JSON string into ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
450+ raise ValueError ("Multiple matches found when deserializing the JSON string into ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MDLResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
437451 elif match == 0 :
438452 # no match
439- raise ValueError ("No match found when deserializing the JSON string into ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
453+ raise ValueError ("No match found when deserializing the JSON string into ContainerListListInner with oneOf schemas: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MDLResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult, VDSDataResult, VDSNCDataResult. Details: " + ", " .join (error_messages ))
440454 else :
441455 return instance
442456
@@ -450,7 +464,7 @@ def to_json(self) -> str:
450464 else :
451465 return json .dumps (self .actual_instance )
452466
453- def to_dict (self ) -> Optional [Union [Dict [str , Any ], AuthenticityResult , BarcodePositionResult , ByteArrayResult , ChosenDocumentTypeResult , DocBarCodeInfo , DocumentBinaryInfoResult , DocumentImageResult , DocumentPositionResult , DocumentTypesCandidatesResult , EncryptedRCLResult , FaceDetectionResult , GraphicsResult , ImageQualityResult , ImagesResult , LexicalAnalysisResult , LicenseResult , MRZDetectorResult , MRZPositionResult , MRZTestQualityResult , RFIDGraphicsInfoResult , RFIDTextDataResult , StatusResult , TextDataResult , TextResult , VDSDataResult , VDSNCDataResult ]]:
467+ def to_dict (self ) -> Optional [Union [Dict [str , Any ], AuthenticityResult , BarcodePositionResult , ByteArrayResult , ChosenDocumentTypeResult , DocBarCodeInfo , DocumentBinaryInfoResult , DocumentImageResult , DocumentPositionResult , DocumentTypesCandidatesResult , EncryptedRCLResult , FaceDetectionResult , GraphicsResult , ImageQualityResult , ImagesResult , LexicalAnalysisResult , LicenseResult , MDLResult , MRZDetectorResult , MRZPositionResult , MRZTestQualityResult , RFIDGraphicsInfoResult , RFIDTextDataResult , StatusResult , TextDataResult , TextResult , VDSDataResult , VDSNCDataResult ]]:
454468 """Returns the dict representation of the actual instance"""
455469 if self .actual_instance is None :
456470 return None
0 commit comments