@@ -323,6 +323,30 @@ public ContainerListListInner(RFIDTextDataResult actualInstance)
323323 this . ActualInstance = actualInstance ?? throw new ArgumentException ( "Invalid instance found. Must not be null." ) ;
324324 }
325325
326+ /// <summary>
327+ /// Initializes a new instance of the <see cref="ContainerListListInner" /> class
328+ /// with the <see cref="VDSNCDataResult" /> class
329+ /// </summary>
330+ /// <param name="actualInstance">An instance of VDSNCDataResult.</param>
331+ public ContainerListListInner ( VDSNCDataResult actualInstance )
332+ {
333+ this . IsNullable = false ;
334+ this . SchemaType = "oneOf" ;
335+ this . ActualInstance = actualInstance ?? throw new ArgumentException ( "Invalid instance found. Must not be null." ) ;
336+ }
337+
338+ /// <summary>
339+ /// Initializes a new instance of the <see cref="ContainerListListInner" /> class
340+ /// with the <see cref="VDSDataResult" /> class
341+ /// </summary>
342+ /// <param name="actualInstance">An instance of VDSDataResult.</param>
343+ public ContainerListListInner ( VDSDataResult actualInstance )
344+ {
345+ this . IsNullable = false ;
346+ this . SchemaType = "oneOf" ;
347+ this . ActualInstance = actualInstance ?? throw new ArgumentException ( "Invalid instance found. Must not be null." ) ;
348+ }
349+
326350
327351 private Object _actualInstance ;
328352
@@ -433,9 +457,17 @@ public override Object ActualInstance
433457 {
434458 this . _actualInstance = value ;
435459 }
460+ else if ( value . GetType ( ) == typeof ( VDSDataResult ) || value is VDSDataResult )
461+ {
462+ this . _actualInstance = value ;
463+ }
464+ else if ( value . GetType ( ) == typeof ( VDSNCDataResult ) || value is VDSNCDataResult )
465+ {
466+ this . _actualInstance = value ;
467+ }
436468 else
437469 {
438- throw new ArgumentException ( "Invalid instance found. Must be the following types: AuthenticityResult, BarcodePositionResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult" ) ;
470+ throw new ArgumentException ( "Invalid instance found. Must be the following types: 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 " ) ;
439471 }
440472 }
441473 }
@@ -680,6 +712,26 @@ public RFIDTextDataResult GetRFIDTextDataResult()
680712 return ( RFIDTextDataResult ) this . ActualInstance ;
681713 }
682714
715+ /// <summary>
716+ /// Get the actual instance of `VDSNCDataResult`. If the actual instance is not `VDSNCDataResult`,
717+ /// the InvalidClassException will be thrown
718+ /// </summary>
719+ /// <returns>An instance of VDSNCDataResult</returns>
720+ public VDSNCDataResult GetVDSNCDataResult ( )
721+ {
722+ return ( VDSNCDataResult ) this . ActualInstance ;
723+ }
724+
725+ /// <summary>
726+ /// Get the actual instance of `VDSDataResult`. If the actual instance is not `VDSDataResult`,
727+ /// the InvalidClassException will be thrown
728+ /// </summary>
729+ /// <returns>An instance of VDSDataResult</returns>
730+ public VDSDataResult GetVDSDataResult ( )
731+ {
732+ return ( VDSDataResult ) this . ActualInstance ;
733+ }
734+
683735 /// <summary>
684736 /// Returns the string presentation of the object
685737 /// </summary>
@@ -1198,6 +1250,46 @@ public static ContainerListListInner FromJson(string jsonString)
11981250 System . Diagnostics . Debug . WriteLine ( string . Format ( "Failed to deserialize `{0}` into TextResult: {1}" , jsonString , exception . ToString ( ) ) ) ;
11991251 }
12001252
1253+ try
1254+ {
1255+ // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize
1256+ if ( typeof ( VDSDataResult ) . GetProperty ( "AdditionalProperties" ) == null )
1257+ {
1258+ newContainerListListInner = new ContainerListListInner ( JsonConvert . DeserializeObject < VDSDataResult > ( jsonString , ContainerListListInner . SerializerSettings ) ) ;
1259+ }
1260+ else
1261+ {
1262+ newContainerListListInner = new ContainerListListInner ( JsonConvert . DeserializeObject < VDSDataResult > ( jsonString , ContainerListListInner . AdditionalPropertiesSerializerSettings ) ) ;
1263+ }
1264+ matchedTypes . Add ( "VDSDataResult" ) ;
1265+ match ++ ;
1266+ }
1267+ catch ( Exception exception )
1268+ {
1269+ // deserialization failed, try the next one
1270+ System . Diagnostics . Debug . WriteLine ( string . Format ( "Failed to deserialize `{0}` into VDSDataResult: {1}" , jsonString , exception . ToString ( ) ) ) ;
1271+ }
1272+
1273+ try
1274+ {
1275+ // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize
1276+ if ( typeof ( VDSNCDataResult ) . GetProperty ( "AdditionalProperties" ) == null )
1277+ {
1278+ newContainerListListInner = new ContainerListListInner ( JsonConvert . DeserializeObject < VDSNCDataResult > ( jsonString , ContainerListListInner . SerializerSettings ) ) ;
1279+ }
1280+ else
1281+ {
1282+ newContainerListListInner = new ContainerListListInner ( JsonConvert . DeserializeObject < VDSNCDataResult > ( jsonString , ContainerListListInner . AdditionalPropertiesSerializerSettings ) ) ;
1283+ }
1284+ matchedTypes . Add ( "VDSNCDataResult" ) ;
1285+ match ++ ;
1286+ }
1287+ catch ( Exception exception )
1288+ {
1289+ // deserialization failed, try the next one
1290+ System . Diagnostics . Debug . WriteLine ( string . Format ( "Failed to deserialize `{0}` into VDSNCDataResult: {1}" , jsonString , exception . ToString ( ) ) ) ;
1291+ }
1292+
12011293 if ( match == 0 )
12021294 {
12031295 throw new InvalidDataException ( "The JSON string `" + jsonString + "` cannot be deserialized into any schema defined." ) ;
0 commit comments