Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
src/Regula.DocumentReader.WebClient/Model/ResultItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,38 @@
*/

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
{
/// <summary>
/// Common fields for all authenticity result objects
/// </summary>
[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<AuthenticityCheckResultItem>, IValidatableObject
{
/// <summary>
Expand Down
19 changes: 18 additions & 1 deletion src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ protected ProcessParams() { }
/// <param name="strictBarcodeDigitalSignatureCheck">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..</param>
/// <param name="selectLongestNames">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..</param>
/// <param name="doBarcodes">Set the types of barcodes to process..</param>
public ProcessParams(bool? generateDTCVC = default(bool?), List<int> lcidFilter = default(List<int>), List<int> lcidIgnoreFilter = default(List<int>), 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<int> resultTypeOutput = default(List<int>), bool? doublePageSpread = default(bool?), bool? generateDoublePageSpreadImage = default(bool?), List<int> fieldTypesFilter = default(List<int>), string dateFormat = default(string), int measureSystem = default(int), int imageDpiOutMax = default(int), bool? alreadyCropped = default(bool?), Dictionary<string, Object> customParams = default(Dictionary<string, Object>), List<PerDocumentConfig> config = default(List<PerDocumentConfig>), 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<string> mrzFormatsFilter = default(List<string>), bool? forceReadMrzBeforeLocate = default(bool?), bool? parseBarcodes = default(bool?), int convertCase = default(int), bool? splitNames = default(bool?), bool? disablePerforationOCR = default(bool?), List<int> documentGroupFilter = default(List<int>), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool? ignoreDeviceIdFromImage = default(bool?), List<int> documentIdList = default(List<int>), 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<InputBarcodeType> doBarcodes = default(List<InputBarcodeType>))
/// <param name="strictDLCategoryExpiry">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..</param>
public ProcessParams(bool? generateDTCVC = default(bool?), List<int> lcidFilter = default(List<int>), List<int> lcidIgnoreFilter = default(List<int>), 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<int> resultTypeOutput = default(List<int>), bool? doublePageSpread = default(bool?), bool? generateDoublePageSpreadImage = default(bool?), List<int> fieldTypesFilter = default(List<int>), string dateFormat = default(string), int measureSystem = default(int), int imageDpiOutMax = default(int), bool? alreadyCropped = default(bool?), Dictionary<string, Object> customParams = default(Dictionary<string, Object>), List<PerDocumentConfig> config = default(List<PerDocumentConfig>), 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<string> mrzFormatsFilter = default(List<string>), bool? forceReadMrzBeforeLocate = default(bool?), bool? parseBarcodes = default(bool?), int convertCase = default(int), bool? splitNames = default(bool?), bool? disablePerforationOCR = default(bool?), List<int> documentGroupFilter = default(List<int>), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool? ignoreDeviceIdFromImage = default(bool?), List<int> documentIdList = default(List<int>), 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<InputBarcodeType> doBarcodes = default(List<InputBarcodeType>), bool? strictDLCategoryExpiry = default(bool?))
{
// to ensure "scenario" is required (not null)
if (scenario == null)
Expand Down Expand Up @@ -167,6 +168,7 @@ protected ProcessParams() { }
this.StrictBarcodeDigitalSignatureCheck = strictBarcodeDigitalSignatureCheck;
this.SelectLongestNames = selectLongestNames;
this.DoBarcodes = doBarcodes;
this.StrictDLCategoryExpiry = strictDLCategoryExpiry;
}

/// <summary>
Expand Down Expand Up @@ -572,6 +574,13 @@ protected ProcessParams() { }
[DataMember(Name="doBarcodes", EmitDefaultValue=false)]
public List<InputBarcodeType> DoBarcodes { get; set; }

/// <summary>
/// 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.
/// </summary>
/// <value>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.</value>
[DataMember(Name="strictDLCategoryExpiry", EmitDefaultValue=false)]
public bool? StrictDLCategoryExpiry { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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))
);
}

Expand Down Expand Up @@ -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;
}
}
Expand Down
Loading