Skip to content

Commit 7d4dd76

Browse files
authored
add mrz filter (#33)
1 parent 2b9c381 commit 7d4dd76

File tree

4 files changed

+67
-3
lines changed

4 files changed

+67
-3
lines changed

client/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ src/main/generated/com/regula/documentreader/webclient/model/ImagesFieldValue.ja
5252
src/main/generated/com/regula/documentreader/webclient/model/ImagesResult.java
5353
src/main/generated/com/regula/documentreader/webclient/model/LexicalAnalysisResult.java
5454
src/main/generated/com/regula/documentreader/webclient/model/ListVerifiedFields.java
55+
src/main/generated/com/regula/documentreader/webclient/model/MRZFormat.java
5556
src/main/generated/com/regula/documentreader/webclient/model/OCRSecurityTextResult.java
5657
src/main/generated/com/regula/documentreader/webclient/model/OneCandidate.java
5758
src/main/generated/com/regula/documentreader/webclient/model/OriginalSymbol.java
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Regula Document Reader Web API
3+
* 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
4+
*
5+
* The version of the OpenAPI document: 5.5.0
6+
*
7+
*
8+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9+
* https://openapi-generator.tech
10+
* Do not edit the class manually.
11+
*/
12+
13+
package com.regula.documentreader.webclient.model;
14+
15+
public class MRZFormat {
16+
17+
public static final String IDL = "1x30";
18+
19+
public static final String ID1 = "3x30";
20+
21+
public static final String ID2 = "2x36";
22+
23+
public static final String ID3 = "2x44";
24+
25+
public static final String CAN = "1x6";
26+
27+
public static final String ID1_2_30 = "2x30";
28+
}

client/src/main/generated/com/regula/documentreader/webclient/model/ProcessParams.java

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ public class ProcessParams {
158158
@SerializedName(SERIALIZED_NAME_RETURN_UNCROPPED_IMAGE)
159159
private Boolean returnUncroppedImage;
160160

161+
public static final String SERIALIZED_NAME_MRZ_FORMATS_FILTER = "mrzFormatsFilter";
162+
163+
@SerializedName(SERIALIZED_NAME_MRZ_FORMATS_FILTER)
164+
private List<MRZFormat> mrzFormatsFilter = null;
165+
161166
public ProcessParams withScenario(String scenario) {
162167
this.scenario = scenario;
163168
return this;
@@ -720,6 +725,33 @@ public void setReturnUncroppedImage(Boolean returnUncroppedImage) {
720725
this.returnUncroppedImage = returnUncroppedImage;
721726
}
722727

728+
public ProcessParams withMrzFormatsFilter(List<MRZFormat> mrzFormatsFilter) {
729+
this.mrzFormatsFilter = mrzFormatsFilter;
730+
return this;
731+
}
732+
733+
public ProcessParams addMrzFormatsFilterItem(MRZFormat mrzFormatsFilterItem) {
734+
if (this.mrzFormatsFilter == null) {
735+
this.mrzFormatsFilter = new ArrayList<MRZFormat>();
736+
}
737+
this.mrzFormatsFilter.add(mrzFormatsFilterItem);
738+
return this;
739+
}
740+
741+
/**
742+
* This option allows limiting MRZ formats to be recognized by specifying them in array.
743+
*
744+
* @return mrzFormatsFilter
745+
*/
746+
@javax.annotation.Nullable
747+
public List<MRZFormat> getMrzFormatsFilter() {
748+
return mrzFormatsFilter;
749+
}
750+
751+
public void setMrzFormatsFilter(List<MRZFormat> mrzFormatsFilter) {
752+
this.mrzFormatsFilter = mrzFormatsFilter;
753+
}
754+
723755
@Override
724756
public boolean equals(java.lang.Object o) {
725757
if (this == o) {
@@ -756,7 +788,8 @@ public boolean equals(java.lang.Object o) {
756788
&& Objects.equals(this.multiDocOnImage, processParams.multiDocOnImage)
757789
&& Objects.equals(this.shiftExpiryDate, processParams.shiftExpiryDate)
758790
&& Objects.equals(this.minimalHolderAge, processParams.minimalHolderAge)
759-
&& Objects.equals(this.returnUncroppedImage, processParams.returnUncroppedImage);
791+
&& Objects.equals(this.returnUncroppedImage, processParams.returnUncroppedImage)
792+
&& Objects.equals(this.mrzFormatsFilter, processParams.mrzFormatsFilter);
760793
}
761794

762795
@Override
@@ -788,7 +821,8 @@ public int hashCode() {
788821
multiDocOnImage,
789822
shiftExpiryDate,
790823
minimalHolderAge,
791-
returnUncroppedImage);
824+
returnUncroppedImage,
825+
mrzFormatsFilter);
792826
}
793827

794828
@Override
@@ -832,6 +866,7 @@ public String toString() {
832866
sb.append(" returnUncroppedImage: ")
833867
.append(toIndentedString(returnUncroppedImage))
834868
.append("\n");
869+
sb.append(" mrzFormatsFilter: ").append(toIndentedString(mrzFormatsFilter)).append("\n");
835870
sb.append("}");
836871
return sb.toString();
837872
}

update-models.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Light=Integer,Result=Integer,VerificationResult=Integer,RfidLocation=Integer,\
77
DocumentTypeRecognitionResult=Integer,ProcessingStatus=Integer,Source=String,CheckResult=Integer,\
88
LCID=Integer,DocumentType=Integer,CheckDiagnose=Integer,Critical=Integer,AuthenticityResultType=Integer,\
99
SecurityFeatureType=Integer,Visibility=Integer,ImageQualityCheckType=Integer,\
10-
LogLevel=String" \
10+
LogLevel=String,MRZFormat=String" \
1111
\
1212
&& docker run --user "$(id -u):$(id -g)" --rm -v "${PWD}:/client" -v "$DOCS_DEFINITION_FOLDER:/definitions" \
1313
openapitools/openapi-generator-cli:v5.0.0-beta2 generate \

0 commit comments

Comments
 (0)