Skip to content

Commit 73d0be7

Browse files
authored
5.6 updates (#17)
1 parent 49f6cf5 commit 73d0be7

File tree

3 files changed

+156
-2
lines changed

3 files changed

+156
-2
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Regula Document Reader Web API
3+
*
4+
* 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
5+
*
6+
* The version of the OpenAPI document: 5.5.0
7+
*
8+
* Generated by: https://github.com/openapitools/openapi-generator.git
9+
*/
10+
11+
using System;
12+
using System.Linq;
13+
using System.IO;
14+
using System.Text;
15+
using System.Text.RegularExpressions;
16+
using System.Collections;
17+
using System.Collections.Generic;
18+
using System.Collections.ObjectModel;
19+
using System.Runtime.Serialization;
20+
using Newtonsoft.Json;
21+
using Newtonsoft.Json.Converters;
22+
using System.ComponentModel.DataAnnotations;
23+
using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter;
24+
25+
namespace Regula.DocumentReader.WebClient.Model
26+
{
27+
public class LogLevel
28+
{
29+
30+
31+
public const string FATAL_ERROR = "FatalError";
32+
33+
34+
public const string ERROR = "Error";
35+
36+
37+
public const string WARNING = "Warning";
38+
39+
40+
public const string INFO = "Info";
41+
42+
43+
public const string DEBUG = "Debug";
44+
45+
}
46+
}

src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ protected ProcessParams() { }
5656
/// <param name="checkRequiredTextFields">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 \&quot;error\&quot; in validity status. (default to false).</param>
5757
/// <param name="returnCroppedBarcode">When enabled, returns cropped barcode images for unknown documents (default to false).</param>
5858
/// <param name="imageQA">imageQA.</param>
59-
public ProcessParams(string scenario = default(string), List<int> resultTypeOutput = default(List<int>), bool doublePageSpread = 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>), 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))
59+
/// <param name="forceDocFormat">forceDocFormat.</param>
60+
/// <param name="noGraphics">When enabled no graphic fields will be cropped from document image. (default to false).</param>
61+
/// <param name="documentAreaMin">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).</param>
62+
/// <param name="logLevel">logLevel.</param>
63+
/// <param name="depersonalizeLog">When enabled all personal data will be forcibly removed from the logs. (default to false).</param>
64+
public ProcessParams(string scenario = default(string), List<int> resultTypeOutput = default(List<int>), bool doublePageSpread = 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>), 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)
6065
{
6166
// to ensure "scenario" is required (not null)
6267
if (scenario == null)
@@ -125,6 +130,35 @@ protected ProcessParams() { }
125130
this.ReturnCroppedBarcode = returnCroppedBarcode;
126131
}
127132
this.ImageQA = imageQA;
133+
this.ForceDocFormat = forceDocFormat;
134+
// use default value if no "noGraphics" provided
135+
if (noGraphics == null)
136+
{
137+
this.NoGraphics = false;
138+
}
139+
else
140+
{
141+
this.NoGraphics = noGraphics;
142+
}
143+
// use default value if no "documentAreaMin" provided
144+
if (documentAreaMin == null)
145+
{
146+
this.DocumentAreaMin = 0F;
147+
}
148+
else
149+
{
150+
this.DocumentAreaMin = documentAreaMin;
151+
}
152+
this.LogLevel = logLevel;
153+
// use default value if no "depersonalizeLog" provided
154+
if (depersonalizeLog == null)
155+
{
156+
this.DepersonalizeLog = false;
157+
}
158+
else
159+
{
160+
this.DepersonalizeLog = depersonalizeLog;
161+
}
128162
}
129163

130164
/// <summary>
@@ -250,6 +284,39 @@ protected ProcessParams() { }
250284
[DataMember(Name="imageQA", EmitDefaultValue=false)]
251285
public ImageQA ImageQA { get; set; }
252286

287+
/// <summary>
288+
/// Gets or Sets ForceDocFormat
289+
/// </summary>
290+
[DataMember(Name="forceDocFormat", EmitDefaultValue=false)]
291+
public int ForceDocFormat { get; set; }
292+
293+
/// <summary>
294+
/// When enabled no graphic fields will be cropped from document image.
295+
/// </summary>
296+
/// <value>When enabled no graphic fields will be cropped from document image.</value>
297+
[DataMember(Name="noGraphics", EmitDefaultValue=false)]
298+
public bool NoGraphics { get; set; }
299+
300+
/// <summary>
301+
/// 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.
302+
/// </summary>
303+
/// <value>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.</value>
304+
[DataMember(Name="documentAreaMin", EmitDefaultValue=false)]
305+
public float DocumentAreaMin { get; set; }
306+
307+
/// <summary>
308+
/// Gets or Sets LogLevel
309+
/// </summary>
310+
[DataMember(Name="logLevel", EmitDefaultValue=false)]
311+
public string LogLevel { get; set; }
312+
313+
/// <summary>
314+
/// When enabled all personal data will be forcibly removed from the logs.
315+
/// </summary>
316+
/// <value>When enabled all personal data will be forcibly removed from the logs.</value>
317+
[DataMember(Name="depersonalizeLog", EmitDefaultValue=false)]
318+
public bool DepersonalizeLog { get; set; }
319+
253320
/// <summary>
254321
/// Returns the string presentation of the object
255322
/// </summary>
@@ -276,6 +343,11 @@ public override string ToString()
276343
sb.Append(" CheckRequiredTextFields: ").Append(CheckRequiredTextFields).Append("\n");
277344
sb.Append(" ReturnCroppedBarcode: ").Append(ReturnCroppedBarcode).Append("\n");
278345
sb.Append(" ImageQA: ").Append(ImageQA).Append("\n");
346+
sb.Append(" ForceDocFormat: ").Append(ForceDocFormat).Append("\n");
347+
sb.Append(" NoGraphics: ").Append(NoGraphics).Append("\n");
348+
sb.Append(" DocumentAreaMin: ").Append(DocumentAreaMin).Append("\n");
349+
sb.Append(" LogLevel: ").Append(LogLevel).Append("\n");
350+
sb.Append(" DepersonalizeLog: ").Append(DepersonalizeLog).Append("\n");
279351
sb.Append("}\n");
280352
return sb.ToString();
281353
}
@@ -402,6 +474,31 @@ public bool Equals(ProcessParams input)
402474
this.ImageQA == input.ImageQA ||
403475
(this.ImageQA != null &&
404476
this.ImageQA.Equals(input.ImageQA))
477+
) &&
478+
(
479+
this.ForceDocFormat == input.ForceDocFormat ||
480+
(this.ForceDocFormat != null &&
481+
this.ForceDocFormat.Equals(input.ForceDocFormat))
482+
) &&
483+
(
484+
this.NoGraphics == input.NoGraphics ||
485+
(this.NoGraphics != null &&
486+
this.NoGraphics.Equals(input.NoGraphics))
487+
) &&
488+
(
489+
this.DocumentAreaMin == input.DocumentAreaMin ||
490+
(this.DocumentAreaMin != null &&
491+
this.DocumentAreaMin.Equals(input.DocumentAreaMin))
492+
) &&
493+
(
494+
this.LogLevel == input.LogLevel ||
495+
(this.LogLevel != null &&
496+
this.LogLevel.Equals(input.LogLevel))
497+
) &&
498+
(
499+
this.DepersonalizeLog == input.DepersonalizeLog ||
500+
(this.DepersonalizeLog != null &&
501+
this.DepersonalizeLog.Equals(input.DepersonalizeLog))
405502
);
406503
}
407504

@@ -450,6 +547,16 @@ public override int GetHashCode()
450547
hashCode = hashCode * 59 + this.ReturnCroppedBarcode.GetHashCode();
451548
if (this.ImageQA != null)
452549
hashCode = hashCode * 59 + this.ImageQA.GetHashCode();
550+
if (this.ForceDocFormat != null)
551+
hashCode = hashCode * 59 + this.ForceDocFormat.GetHashCode();
552+
if (this.NoGraphics != null)
553+
hashCode = hashCode * 59 + this.NoGraphics.GetHashCode();
554+
if (this.DocumentAreaMin != null)
555+
hashCode = hashCode * 59 + this.DocumentAreaMin.GetHashCode();
556+
if (this.LogLevel != null)
557+
hashCode = hashCode * 59 + this.LogLevel.GetHashCode();
558+
if (this.DepersonalizeLog != null)
559+
hashCode = hashCode * 59 + this.DepersonalizeLog.GetHashCode();
453560
return hashCode;
454561
}
455562
}

update-models.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ DOCS_DEFINITION_FOLDER="${PWD}/../DocumentReader-web-openapi" \
44
Light=int,Result=int,VerificationResult=int,RfidLocation=int,\
55
DocumentTypeRecognitionResult=int,ProcessingStatus=int,Source=string,CheckResult=int,\
66
LCID=int,DocumentType=int,MeasureSystem=int,SecurityFeatureType=int,CheckDiagnose=int,\
7-
Critical=int,Visibility=int,AuthenticityResultType=int,ImageQualityCheckType=int" \
7+
Critical=int,Visibility=int,AuthenticityResultType=int,ImageQualityCheckType=int,\
8+
LogLevel=string"\
89
\
910
&& docker run --user "$(id -u):$(id -g)" --rm -v "${PWD}:/client" -v "$DOCS_DEFINITION_FOLDER:/definitions" \
1011
openapitools/openapi-generator-cli:v5.0.0-beta2 generate \

0 commit comments

Comments
 (0)