diff --git a/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs new file mode 100644 index 0000000..67662f3 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs @@ -0,0 +1,46 @@ +/* + * 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: 5.5.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 +{ + public class LogLevel + { + + + public const string FATAL_ERROR = "FatalError"; + + + public const string ERROR = "Error"; + + + public const string WARNING = "Warning"; + + + public const string INFO = "Info"; + + + public const string DEBUG = "Debug"; + + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index f23f020..a4f8750 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -56,7 +56,12 @@ protected ProcessParams() { } /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have \"error\" in validity status. (default to false). /// When enabled, returns cropped barcode images for unknown documents (default to false). /// imageQA. - public ProcessParams(string scenario = default(string), List resultTypeOutput = default(List), bool doublePageSpread = 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), bool log = default(bool), int forceDocID = default(int), bool matchTextFieldMask = true, bool fastDocDetect = true, bool updateOCRValidityByGlare = false, bool generateDoublePageSpreadImage = default(bool), bool checkRequiredTextFields = false, bool returnCroppedBarcode = false, ImageQA imageQA = default(ImageQA)) + /// forceDocFormat. + /// When enabled no graphic fields will be cropped from document image. (default to false). + /// Specifies minimal area of the image that document should cover to be treated as candidate when locating. Value should be in range from 0 to 1, where 1 is when document should fully cover the image. (default to 0F). + /// logLevel. + /// When enabled all personal data will be forcibly removed from the logs. (default to false). + public ProcessParams(string scenario = default(string), List resultTypeOutput = default(List), bool doublePageSpread = 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), bool log = default(bool), int forceDocID = default(int), bool matchTextFieldMask = true, bool fastDocDetect = true, bool updateOCRValidityByGlare = false, bool generateDoublePageSpreadImage = default(bool), bool checkRequiredTextFields = false, bool returnCroppedBarcode = false, ImageQA imageQA = default(ImageQA), int forceDocFormat = default(int), bool noGraphics = false, float documentAreaMin = 0F, string logLevel = default(string), bool depersonalizeLog = false) { // to ensure "scenario" is required (not null) if (scenario == null) @@ -125,6 +130,35 @@ protected ProcessParams() { } this.ReturnCroppedBarcode = returnCroppedBarcode; } this.ImageQA = imageQA; + this.ForceDocFormat = forceDocFormat; + // use default value if no "noGraphics" provided + if (noGraphics == null) + { + this.NoGraphics = false; + } + else + { + this.NoGraphics = noGraphics; + } + // use default value if no "documentAreaMin" provided + if (documentAreaMin == null) + { + this.DocumentAreaMin = 0F; + } + else + { + this.DocumentAreaMin = documentAreaMin; + } + this.LogLevel = logLevel; + // use default value if no "depersonalizeLog" provided + if (depersonalizeLog == null) + { + this.DepersonalizeLog = false; + } + else + { + this.DepersonalizeLog = depersonalizeLog; + } } /// @@ -250,6 +284,39 @@ protected ProcessParams() { } [DataMember(Name="imageQA", EmitDefaultValue=false)] public ImageQA ImageQA { get; set; } + /// + /// Gets or Sets ForceDocFormat + /// + [DataMember(Name="forceDocFormat", EmitDefaultValue=false)] + public int ForceDocFormat { get; set; } + + /// + /// When enabled no graphic fields will be cropped from document image. + /// + /// When enabled no graphic fields will be cropped from document image. + [DataMember(Name="noGraphics", EmitDefaultValue=false)] + public bool NoGraphics { get; set; } + + /// + /// Specifies minimal area of the image that document should cover to be treated as candidate when locating. Value should be in range from 0 to 1, where 1 is when document should fully cover the image. + /// + /// Specifies minimal area of the image that document should cover to be treated as candidate when locating. Value should be in range from 0 to 1, where 1 is when document should fully cover the image. + [DataMember(Name="documentAreaMin", EmitDefaultValue=false)] + public float DocumentAreaMin { get; set; } + + /// + /// Gets or Sets LogLevel + /// + [DataMember(Name="logLevel", EmitDefaultValue=false)] + public string LogLevel { get; set; } + + /// + /// When enabled all personal data will be forcibly removed from the logs. + /// + /// When enabled all personal data will be forcibly removed from the logs. + [DataMember(Name="depersonalizeLog", EmitDefaultValue=false)] + public bool DepersonalizeLog { get; set; } + /// /// Returns the string presentation of the object /// @@ -276,6 +343,11 @@ public override string ToString() sb.Append(" CheckRequiredTextFields: ").Append(CheckRequiredTextFields).Append("\n"); sb.Append(" ReturnCroppedBarcode: ").Append(ReturnCroppedBarcode).Append("\n"); sb.Append(" ImageQA: ").Append(ImageQA).Append("\n"); + sb.Append(" ForceDocFormat: ").Append(ForceDocFormat).Append("\n"); + sb.Append(" NoGraphics: ").Append(NoGraphics).Append("\n"); + sb.Append(" DocumentAreaMin: ").Append(DocumentAreaMin).Append("\n"); + sb.Append(" LogLevel: ").Append(LogLevel).Append("\n"); + sb.Append(" DepersonalizeLog: ").Append(DepersonalizeLog).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -402,6 +474,31 @@ public bool Equals(ProcessParams input) this.ImageQA == input.ImageQA || (this.ImageQA != null && this.ImageQA.Equals(input.ImageQA)) + ) && + ( + this.ForceDocFormat == input.ForceDocFormat || + (this.ForceDocFormat != null && + this.ForceDocFormat.Equals(input.ForceDocFormat)) + ) && + ( + this.NoGraphics == input.NoGraphics || + (this.NoGraphics != null && + this.NoGraphics.Equals(input.NoGraphics)) + ) && + ( + this.DocumentAreaMin == input.DocumentAreaMin || + (this.DocumentAreaMin != null && + this.DocumentAreaMin.Equals(input.DocumentAreaMin)) + ) && + ( + this.LogLevel == input.LogLevel || + (this.LogLevel != null && + this.LogLevel.Equals(input.LogLevel)) + ) && + ( + this.DepersonalizeLog == input.DepersonalizeLog || + (this.DepersonalizeLog != null && + this.DepersonalizeLog.Equals(input.DepersonalizeLog)) ); } @@ -450,6 +547,16 @@ public override int GetHashCode() hashCode = hashCode * 59 + this.ReturnCroppedBarcode.GetHashCode(); if (this.ImageQA != null) hashCode = hashCode * 59 + this.ImageQA.GetHashCode(); + if (this.ForceDocFormat != null) + hashCode = hashCode * 59 + this.ForceDocFormat.GetHashCode(); + if (this.NoGraphics != null) + hashCode = hashCode * 59 + this.NoGraphics.GetHashCode(); + if (this.DocumentAreaMin != null) + hashCode = hashCode * 59 + this.DocumentAreaMin.GetHashCode(); + if (this.LogLevel != null) + hashCode = hashCode * 59 + this.LogLevel.GetHashCode(); + if (this.DepersonalizeLog != null) + hashCode = hashCode * 59 + this.DepersonalizeLog.GetHashCode(); return hashCode; } } diff --git a/update-models.sh b/update-models.sh index 4a11e21..db50faf 100755 --- a/update-models.sh +++ b/update-models.sh @@ -4,7 +4,8 @@ DOCS_DEFINITION_FOLDER="${PWD}/../DocumentReader-web-openapi" \ Light=int,Result=int,VerificationResult=int,RfidLocation=int,\ DocumentTypeRecognitionResult=int,ProcessingStatus=int,Source=string,CheckResult=int,\ LCID=int,DocumentType=int,MeasureSystem=int,SecurityFeatureType=int,CheckDiagnose=int,\ -Critical=int,Visibility=int,AuthenticityResultType=int,ImageQualityCheckType=int" \ +Critical=int,Visibility=int,AuthenticityResultType=int,ImageQualityCheckType=int,\ +LogLevel=string"\ \ && docker run --user "$(id -u):$(id -g)" --rm -v "${PWD}:/client" -v "$DOCS_DEFINITION_FOLDER:/definitions" \ openapitools/openapi-generator-cli:v5.0.0-beta2 generate \