Skip to content

Commit f620d89

Browse files
authored
convert case option (#38)
1 parent 6d1a8f0 commit f620d89

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ protected ProcessParams() { }
6969
/// <param name="mrzFormatsFilter">This option allows limiting MRZ formats to be recognized by specifying them in array..</param>
7070
/// <param name="forceReadMrzBeforeLocate">This option can be set to true to 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..</param>
7171
/// <param name="parseBarcodes">This option can be set to false to stop parsing after barcode is read..</param>
72-
public ProcessParams(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), int forceDocFormat = default(int), bool noGraphics = default(bool), float documentAreaMin = default(float), 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))
72+
/// <param name="convertCase">convertCase.</param>
73+
public ProcessParams(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), int forceDocFormat = default(int), bool noGraphics = default(bool), float documentAreaMin = default(float), 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))
7374
{
7475
// to ensure "scenario" is required (not null)
7576
if (scenario == null)
@@ -111,6 +112,7 @@ protected ProcessParams() { }
111112
this.MrzFormatsFilter = mrzFormatsFilter;
112113
this.ForceReadMrzBeforeLocate = forceReadMrzBeforeLocate;
113114
this.ParseBarcodes = parseBarcodes;
115+
this.ConvertCase = convertCase;
114116
}
115117

116118
/// <summary>
@@ -325,6 +327,12 @@ protected ProcessParams() { }
325327
[DataMember(Name="parseBarcodes", EmitDefaultValue=false)]
326328
public bool ParseBarcodes { get; set; }
327329

330+
/// <summary>
331+
/// Gets or Sets ConvertCase
332+
/// </summary>
333+
[DataMember(Name="convertCase", EmitDefaultValue=false)]
334+
public int ConvertCase { get; set; }
335+
328336
/// <summary>
329337
/// Returns the string presentation of the object
330338
/// </summary>
@@ -364,6 +372,7 @@ public override string ToString()
364372
sb.Append(" MrzFormatsFilter: ").Append(MrzFormatsFilter).Append("\n");
365373
sb.Append(" ForceReadMrzBeforeLocate: ").Append(ForceReadMrzBeforeLocate).Append("\n");
366374
sb.Append(" ParseBarcodes: ").Append(ParseBarcodes).Append("\n");
375+
sb.Append(" ConvertCase: ").Append(ConvertCase).Append("\n");
367376
sb.Append("}\n");
368377
return sb.ToString();
369378
}
@@ -557,6 +566,11 @@ public bool Equals(ProcessParams input)
557566
this.ParseBarcodes == input.ParseBarcodes ||
558567
(this.ParseBarcodes != null &&
559568
this.ParseBarcodes.Equals(input.ParseBarcodes))
569+
) &&
570+
(
571+
this.ConvertCase == input.ConvertCase ||
572+
(this.ConvertCase != null &&
573+
this.ConvertCase.Equals(input.ConvertCase))
560574
);
561575
}
562576

@@ -631,6 +645,8 @@ public override int GetHashCode()
631645
hashCode = hashCode * 59 + this.ForceReadMrzBeforeLocate.GetHashCode();
632646
if (this.ParseBarcodes != null)
633647
hashCode = hashCode * 59 + this.ParseBarcodes.GetHashCode();
648+
if (this.ConvertCase != null)
649+
hashCode = hashCode * 59 + this.ConvertCase.GetHashCode();
634650
return hashCode;
635651
}
636652
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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.7.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 TextPostProcessing
28+
{
29+
30+
31+
public const int NO_CHANGE = 0;
32+
33+
34+
public const int UPPERCASE = 1;
35+
36+
37+
public const int LOWERCASE = 2;
38+
39+
40+
public const int CAPITAL = 3;
41+
42+
}
43+
}

update-models.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ 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,\
77
Critical=int,Visibility=int,AuthenticityResultType=int,ImageQualityCheckType=int,\
8-
LogLevel=string,MRZFormat=string"\
8+
LogLevel=string,MRZFormat=string,TextPostProcessing=int"\
99
\
1010
&& docker run --user "$(id -u):$(id -g)" --rm -v "${PWD}:/client" -v "$DOCS_DEFINITION_FOLDER:/definitions" \
1111
openapitools/openapi-generator-cli:v5.0.0-beta2 generate \

0 commit comments

Comments
 (0)