diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 88a8a0b..6daa997 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -16,5 +16,6 @@ src/Regula.DocumentReader.WebClient/Properties/** # generator bugs, require manual change src/Regula.DocumentReader.WebClient/Model/ContainerList.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs **/*AllOf.cs -src/Regula.DocumentReader.WebClient/Model/ResultItem.cs \ No newline at end of file +src/Regula.DocumentReader.WebClient/Model/ResultItem.cs diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index 4a4360b..2a48102 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -9,19 +9,14 @@ */ using System; -using System.Linq; using System.IO; using System.Text; -using System.Text.RegularExpressions; -using System.Collections; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Runtime.Serialization; using Newtonsoft.Json; -using Newtonsoft.Json.Converters; using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Model.Ext.Autheticity; namespace Regula.DocumentReader.WebClient.Model { @@ -29,12 +24,23 @@ namespace Regula.DocumentReader.WebClient.Model /// Common fields for all authenticity result objects /// [DataContract] - [JsonConverter(typeof(JsonSubtypes), "type")] - [JsonSubtypes.KnownSubType(typeof(PhotoIdentResult), "PhotoIdentResult")] - [JsonSubtypes.KnownSubType(typeof(OCRSecurityTextResult), "OCRSecurityTextResult")] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "SecurityFeatureResult")] - [JsonSubtypes.KnownSubType(typeof(IdentResult), "IdentResult")] - [JsonSubtypes.KnownSubType(typeof(FiberResult), "FiberResult")] + [JsonConverter(typeof(JsonSubtypes), "Type")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.UV_LUMINESCENCE)] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.IR_B900)] + [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.IMAGE_PATTERN)] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.AXIAL_PROTECTION)] + [JsonSubtypes.KnownSubType(typeof(FiberResult), AuthenticityResultType.UV_FIBERS)] + [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.IR_VISIBILITY)] + [JsonSubtypes.KnownSubType(typeof(OCRSecurityTextResult), AuthenticityResultType.OCR_SECURITY_TEXT)] + [JsonSubtypes.KnownSubType(typeof(ImageIdentChecks), AuthenticityResultType.IPI)] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.PHOTO_EMBED_TYPE)] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.HOLOGRAMS)] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.OVI)] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.PHOTO_AREA)] + [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.PORTRAIT_COMPARISON)] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.BARCODE_FORMAT_CHECK)] + [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.KINEGRAM)] + [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.LETTER_SCREEN)] public partial class AuthenticityCheckResultItem : IEquatable, IValidatableObject { /// diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index b37fca3..e002ebc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -97,7 +97,8 @@ protected ProcessParams() { } /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed.. /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc.. /// Set the types of barcodes to process.. - public ProcessParams(bool? generateDTCVC = default(bool?), List lcidFilter = default(List), List lcidIgnoreFilter = default(List), bool? oneShotIdentification = default(bool?), bool? useFaceApi = default(bool?), FaceApi faceApi = default(FaceApi), bool? doDetectCan = default(bool?), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), string scenario = default(string), List resultTypeOutput = default(List), bool? doublePageSpread = default(bool?), bool? generateDoublePageSpreadImage = default(bool?), List fieldTypesFilter = default(List), string dateFormat = default(string), int measureSystem = default(int), int imageDpiOutMax = default(int), bool? alreadyCropped = default(bool?), Dictionary customParams = default(Dictionary), List config = default(List), bool? log = default(bool?), string logLevel = default(string), int forceDocID = default(int), bool? matchTextFieldMask = default(bool?), bool? fastDocDetect = default(bool?), bool? updateOCRValidityByGlare = default(bool?), bool? checkRequiredTextFields = default(bool?), bool? returnCroppedBarcode = default(bool?), ImageQA imageQa = default(ImageQA), bool? strictImageQuality = default(bool?), bool? respectImageQuality = default(bool?), int forceDocFormat = default(int), bool? noGraphics = default(bool?), bool? depersonalizeLog = default(bool?), bool? multiDocOnImage = default(bool?), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool? returnUncroppedImage = default(bool?), List mrzFormatsFilter = default(List), bool? forceReadMrzBeforeLocate = default(bool?), bool? parseBarcodes = default(bool?), int convertCase = default(int), bool? splitNames = default(bool?), bool? disablePerforationOCR = default(bool?), List documentGroupFilter = default(List), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool? ignoreDeviceIdFromImage = default(bool?), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool? checkAuth = default(bool?), AuthParams authParams = default(AuthParams), MrzDetectModeEnum mrzDetectMode = default(MrzDetectModeEnum), bool? generateNumericCodes = default(bool?), bool? strictBarcodeDigitalSignatureCheck = default(bool?), bool? selectLongestNames = default(bool?), List doBarcodes = default(List)) + /// Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases.. + public ProcessParams(bool? generateDTCVC = default(bool?), List lcidFilter = default(List), List lcidIgnoreFilter = default(List), bool? oneShotIdentification = default(bool?), bool? useFaceApi = default(bool?), FaceApi faceApi = default(FaceApi), bool? doDetectCan = default(bool?), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), string scenario = default(string), List resultTypeOutput = default(List), bool? doublePageSpread = default(bool?), bool? generateDoublePageSpreadImage = default(bool?), List fieldTypesFilter = default(List), string dateFormat = default(string), int measureSystem = default(int), int imageDpiOutMax = default(int), bool? alreadyCropped = default(bool?), Dictionary customParams = default(Dictionary), List config = default(List), bool? log = default(bool?), string logLevel = default(string), int forceDocID = default(int), bool? matchTextFieldMask = default(bool?), bool? fastDocDetect = default(bool?), bool? updateOCRValidityByGlare = default(bool?), bool? checkRequiredTextFields = default(bool?), bool? returnCroppedBarcode = default(bool?), ImageQA imageQa = default(ImageQA), bool? strictImageQuality = default(bool?), bool? respectImageQuality = default(bool?), int forceDocFormat = default(int), bool? noGraphics = default(bool?), bool? depersonalizeLog = default(bool?), bool? multiDocOnImage = default(bool?), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool? returnUncroppedImage = default(bool?), List mrzFormatsFilter = default(List), bool? forceReadMrzBeforeLocate = default(bool?), bool? parseBarcodes = default(bool?), int convertCase = default(int), bool? splitNames = default(bool?), bool? disablePerforationOCR = default(bool?), List documentGroupFilter = default(List), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool? ignoreDeviceIdFromImage = default(bool?), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool? checkAuth = default(bool?), AuthParams authParams = default(AuthParams), MrzDetectModeEnum mrzDetectMode = default(MrzDetectModeEnum), bool? generateNumericCodes = default(bool?), bool? strictBarcodeDigitalSignatureCheck = default(bool?), bool? selectLongestNames = default(bool?), List doBarcodes = default(List), bool? strictDLCategoryExpiry = default(bool?)) { // to ensure "scenario" is required (not null) if (scenario == null) @@ -167,6 +168,7 @@ protected ProcessParams() { } this.StrictBarcodeDigitalSignatureCheck = strictBarcodeDigitalSignatureCheck; this.SelectLongestNames = selectLongestNames; this.DoBarcodes = doBarcodes; + this.StrictDLCategoryExpiry = strictDLCategoryExpiry; } /// @@ -572,6 +574,13 @@ protected ProcessParams() { } [DataMember(Name="doBarcodes", EmitDefaultValue=false)] public List DoBarcodes { get; set; } + /// + /// Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases. + /// + /// Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases. + [DataMember(Name="strictDLCategoryExpiry", EmitDefaultValue=false)] + public bool? StrictDLCategoryExpiry { get; set; } + /// /// Returns the string presentation of the object /// @@ -639,6 +648,7 @@ public override string ToString() sb.Append(" StrictBarcodeDigitalSignatureCheck: ").Append(StrictBarcodeDigitalSignatureCheck).Append("\n"); sb.Append(" SelectLongestNames: ").Append(SelectLongestNames).Append("\n"); sb.Append(" DoBarcodes: ").Append(DoBarcodes).Append("\n"); + sb.Append(" StrictDLCategoryExpiry: ").Append(StrictDLCategoryExpiry).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -977,6 +987,11 @@ public bool Equals(ProcessParams input) this.DoBarcodes != null && input.DoBarcodes != null && this.DoBarcodes.SequenceEqual(input.DoBarcodes) + ) && + ( + this.StrictDLCategoryExpiry == input.StrictDLCategoryExpiry || + (this.StrictDLCategoryExpiry != null && + this.StrictDLCategoryExpiry.Equals(input.StrictDLCategoryExpiry)) ); } @@ -1107,6 +1122,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.SelectLongestNames.GetHashCode(); if (this.DoBarcodes != null) hashCode = hashCode * 59 + this.DoBarcodes.GetHashCode(); + if (this.StrictDLCategoryExpiry != null) + hashCode = hashCode * 59 + this.StrictDLCategoryExpiry.GetHashCode(); return hashCode; } }