diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs new file mode 100644 index 0000000..4615034 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs @@ -0,0 +1,221 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.2.0 + * + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +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 System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DeviceInfo2 + /// + [DataContract] + public partial class DeviceInfo2 : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// app. + /// licenseId. + /// licenseType. + /// licenseSerial. + /// licenseValidUntil. + /// scenarios. + /// version. + public DeviceInfo2(string app = default(string), string licenseId = default(string), string licenseType = default(string), string licenseSerial = default(string), DateTime licenseValidUntil = default(DateTime), List scenarios = default(List), string version = default(string)) + { + this.App = app; + this.LicenseId = licenseId; + this.LicenseType = licenseType; + this.LicenseSerial = licenseSerial; + this.LicenseValidUntil = licenseValidUntil; + this.Scenarios = scenarios; + this.Version = version; + } + + /// + /// Gets or Sets App + /// + [DataMember(Name="app", EmitDefaultValue=false)] + public string App { get; set; } + + /// + /// Gets or Sets LicenseId + /// + [DataMember(Name="licenseId", EmitDefaultValue=false)] + public string LicenseId { get; set; } + + /// + /// Gets or Sets LicenseType + /// + [DataMember(Name="licenseType", EmitDefaultValue=false)] + public string LicenseType { get; set; } + + /// + /// Gets or Sets LicenseSerial + /// + [DataMember(Name="licenseSerial", EmitDefaultValue=false)] + public string LicenseSerial { get; set; } + + /// + /// Gets or Sets LicenseValidUntil + /// + [DataMember(Name="licenseValidUntil", EmitDefaultValue=false)] + public DateTime LicenseValidUntil { get; set; } + + /// + /// Gets or Sets Scenarios + /// + [DataMember(Name="scenarios", EmitDefaultValue=false)] + public List Scenarios { get; set; } + + /// + /// Gets or Sets Version + /// + [DataMember(Name="version", EmitDefaultValue=false)] + public string Version { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeviceInfo2 {\n"); + sb.Append(" App: ").Append(App).Append("\n"); + sb.Append(" LicenseId: ").Append(LicenseId).Append("\n"); + sb.Append(" LicenseType: ").Append(LicenseType).Append("\n"); + sb.Append(" LicenseSerial: ").Append(LicenseSerial).Append("\n"); + sb.Append(" LicenseValidUntil: ").Append(LicenseValidUntil).Append("\n"); + sb.Append(" Scenarios: ").Append(Scenarios).Append("\n"); + sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as DeviceInfo2); + } + + /// + /// Returns true if DeviceInfo2 instances are equal + /// + /// Instance of DeviceInfo2 to be compared + /// Boolean + public bool Equals(DeviceInfo2 input) + { + if (input == null) + return false; + + return + ( + this.App == input.App || + (this.App != null && + this.App.Equals(input.App)) + ) && + ( + this.LicenseId == input.LicenseId || + (this.LicenseId != null && + this.LicenseId.Equals(input.LicenseId)) + ) && + ( + this.LicenseType == input.LicenseType || + (this.LicenseType != null && + this.LicenseType.Equals(input.LicenseType)) + ) && + ( + this.LicenseSerial == input.LicenseSerial || + (this.LicenseSerial != null && + this.LicenseSerial.Equals(input.LicenseSerial)) + ) && + ( + this.LicenseValidUntil == input.LicenseValidUntil || + (this.LicenseValidUntil != null && + this.LicenseValidUntil.Equals(input.LicenseValidUntil)) + ) && + ( + this.Scenarios == input.Scenarios || + this.Scenarios != null && + input.Scenarios != null && + this.Scenarios.SequenceEqual(input.Scenarios) + ) && + ( + this.Version == input.Version || + (this.Version != null && + this.Version.Equals(input.Version)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.App != null) + hashCode = hashCode * 59 + this.App.GetHashCode(); + if (this.LicenseId != null) + hashCode = hashCode * 59 + this.LicenseId.GetHashCode(); + if (this.LicenseType != null) + hashCode = hashCode * 59 + this.LicenseType.GetHashCode(); + if (this.LicenseSerial != null) + hashCode = hashCode * 59 + this.LicenseSerial.GetHashCode(); + if (this.LicenseValidUntil != null) + hashCode = hashCode * 59 + this.LicenseValidUntil.GetHashCode(); + if (this.Scenarios != null) + hashCode = hashCode * 59 + this.Scenarios.GetHashCode(); + if (this.Version != null) + hashCode = hashCode * 59 + this.Version.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index 69a2684..aa8ff85 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -76,6 +76,7 @@ protected ProcessParams() { } /// When enabled, returns input images in output. Disabled by default.. /// This option allows limiting MRZ formats to be recognized by specifying them in array.. /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default.. + /// Allows you to bypass the minimum conditions that should be met to perform the barcode format check. /// This option can be disabled to stop parsing after barcode is read. Enabled by default.. /// convertCase. /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default.. @@ -92,7 +93,7 @@ protected ProcessParams() { } /// authParams. /// mrzDetectMode. /// This parameter is used to generate numeric representation for issuing state and nationality codes. - public ProcessParams(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 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)) + public ProcessParams(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 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 forceBarcodeChecks = 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)) { // to ensure "scenario" is required (not null) if (scenario == null) @@ -141,6 +142,7 @@ protected ProcessParams() { } this.ReturnUncroppedImage = returnUncroppedImage; this.MrzFormatsFilter = mrzFormatsFilter; this.ForceReadMrzBeforeLocate = forceReadMrzBeforeLocate; + this.ForceBarcodeChecks = forceBarcodeChecks; this.ParseBarcodes = parseBarcodes; this.ConvertCase = convertCase; this.SplitNames = splitNames; @@ -419,6 +421,13 @@ protected ProcessParams() { } [DataMember(Name="forceReadMrzBeforeLocate", EmitDefaultValue=false)] public bool ForceReadMrzBeforeLocate { get; set; } + /// + /// Allows you to bypass the minimum conditions that should be met to perform the barcode format check + /// + /// Allows you to bypass the minimum conditions that should be met to perform the barcode format check + [DataMember(Name="forceBarcodeChecks", EmitDefaultValue=false)] + public bool ForceBarcodeChecks { get; set; } + /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. /// @@ -573,6 +582,7 @@ public override string ToString() sb.Append(" ReturnUncroppedImage: ").Append(ReturnUncroppedImage).Append("\n"); sb.Append(" MrzFormatsFilter: ").Append(MrzFormatsFilter).Append("\n"); sb.Append(" ForceReadMrzBeforeLocate: ").Append(ForceReadMrzBeforeLocate).Append("\n"); + sb.Append(" ForceBarcodeChecks: ").Append(ForceBarcodeChecks).Append("\n"); sb.Append(" ParseBarcodes: ").Append(ParseBarcodes).Append("\n"); sb.Append(" ConvertCase: ").Append(ConvertCase).Append("\n"); sb.Append(" SplitNames: ").Append(SplitNames).Append("\n"); @@ -820,6 +830,11 @@ public bool Equals(ProcessParams input) (this.ForceReadMrzBeforeLocate != null && this.ForceReadMrzBeforeLocate.Equals(input.ForceReadMrzBeforeLocate)) ) && + ( + this.ForceBarcodeChecks == input.ForceBarcodeChecks || + (this.ForceBarcodeChecks != null && + this.ForceBarcodeChecks.Equals(input.ForceBarcodeChecks)) + ) && ( this.ParseBarcodes == input.ParseBarcodes || (this.ParseBarcodes != null && @@ -989,6 +1004,8 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.MrzFormatsFilter.GetHashCode(); if (this.ForceReadMrzBeforeLocate != null) hashCode = hashCode * 59 + this.ForceReadMrzBeforeLocate.GetHashCode(); + if (this.ForceBarcodeChecks != null) + hashCode = hashCode * 59 + this.ForceBarcodeChecks.GetHashCode(); if (this.ParseBarcodes != null) hashCode = hashCode * 59 + this.ParseBarcodes.GetHashCode(); if (this.ConvertCase != null)