Skip to content

Commit aaba055

Browse files
Merge pull request #265 from regulaforensics/e6655090
Commit: e6655090
2 parents c81d5f1 + 4ff8327 commit aaba055

File tree

7 files changed

+264
-6
lines changed

7 files changed

+264
-6
lines changed

client/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ src/main/generated/com/regula/documentreader/webclient/model/ProcessRequestImage
177177
src/main/generated/com/regula/documentreader/webclient/model/ProcessResponse.java
178178
src/main/generated/com/regula/documentreader/webclient/model/ProcessSystemInfo.java
179179
src/main/generated/com/regula/documentreader/webclient/model/ProcessingStatus.java
180+
src/main/generated/com/regula/documentreader/webclient/model/PropertiesParams.java
180181
src/main/generated/com/regula/documentreader/webclient/model/RFIDDocVisualExtendedField.java
181182
src/main/generated/com/regula/documentreader/webclient/model/RFIDDocVisualExtendedFieldItem.java
182183
src/main/generated/com/regula/documentreader/webclient/model/RFIDDocVisualExtendedInfo.java

client/src/main/generated/com/regula/documentreader/webclient/JSON.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,8 @@ private static Class getClassByDiscriminator(
13161316
new com.regula.documentreader.webclient.model.ProcessResponse.CustomTypeAdapterFactory());
13171317
gsonBuilder.registerTypeAdapterFactory(
13181318
new com.regula.documentreader.webclient.model.ProcessSystemInfo.CustomTypeAdapterFactory());
1319+
gsonBuilder.registerTypeAdapterFactory(
1320+
new com.regula.documentreader.webclient.model.PropertiesParams.CustomTypeAdapterFactory());
13191321
gsonBuilder.registerTypeAdapterFactory(
13201322
new com.regula.documentreader.webclient.model.RFIDDocVisualExtendedField
13211323
.CustomTypeAdapterFactory());

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

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,18 @@ public class AuthParams {
128128
@javax.annotation.Nullable
129129
private Boolean checkSecurityText;
130130

131+
public static final String SERIALIZED_NAME_CHECK_PROPERTIES = "checkProperties";
132+
133+
@SerializedName(SERIALIZED_NAME_CHECK_PROPERTIES)
134+
@javax.annotation.Nullable
135+
private Boolean checkProperties;
136+
137+
public static final String SERIALIZED_NAME_PROPERTIES_PARAMS = "propertiesParams";
138+
139+
@SerializedName(SERIALIZED_NAME_PROPERTIES_PARAMS)
140+
@javax.annotation.Nullable
141+
private PropertiesParams propertiesParams;
142+
131143
public AuthParams() {}
132144

133145
public AuthParams checkLiveness(@javax.annotation.Nullable Boolean checkLiveness) {
@@ -436,6 +448,45 @@ public void setCheckSecurityText(@javax.annotation.Nullable Boolean checkSecurit
436448
this.checkSecurityText = checkSecurityText;
437449
}
438450

451+
public AuthParams checkProperties(@javax.annotation.Nullable Boolean checkProperties) {
452+
this.checkProperties = checkProperties;
453+
return this;
454+
}
455+
456+
/**
457+
* Set to true to enable detection of the document properties, such as holder's signature and
458+
* other attributes.
459+
*
460+
* @return checkProperties
461+
*/
462+
@javax.annotation.Nullable
463+
public Boolean getCheckProperties() {
464+
return checkProperties;
465+
}
466+
467+
public void setCheckProperties(@javax.annotation.Nullable Boolean checkProperties) {
468+
this.checkProperties = checkProperties;
469+
}
470+
471+
public AuthParams propertiesParams(@javax.annotation.Nullable PropertiesParams propertiesParams) {
472+
this.propertiesParams = propertiesParams;
473+
return this;
474+
}
475+
476+
/**
477+
* Get propertiesParams
478+
*
479+
* @return propertiesParams
480+
*/
481+
@javax.annotation.Nullable
482+
public PropertiesParams getPropertiesParams() {
483+
return propertiesParams;
484+
}
485+
486+
public void setPropertiesParams(@javax.annotation.Nullable PropertiesParams propertiesParams) {
487+
this.propertiesParams = propertiesParams;
488+
}
489+
439490
@Override
440491
public boolean equals(Object o) {
441492
if (this == o) {
@@ -460,7 +511,9 @@ public boolean equals(Object o) {
460511
&& Objects.equals(this.checkPhotoEmbedding, authParams.checkPhotoEmbedding)
461512
&& Objects.equals(this.checkPhotoComparison, authParams.checkPhotoComparison)
462513
&& Objects.equals(this.checkLetterScreen, authParams.checkLetterScreen)
463-
&& Objects.equals(this.checkSecurityText, authParams.checkSecurityText);
514+
&& Objects.equals(this.checkSecurityText, authParams.checkSecurityText)
515+
&& Objects.equals(this.checkProperties, authParams.checkProperties)
516+
&& Objects.equals(this.propertiesParams, authParams.propertiesParams);
464517
}
465518

466519
@Override
@@ -481,7 +534,9 @@ public int hashCode() {
481534
checkPhotoEmbedding,
482535
checkPhotoComparison,
483536
checkLetterScreen,
484-
checkSecurityText);
537+
checkSecurityText,
538+
checkProperties,
539+
propertiesParams);
485540
}
486541

487542
@Override
@@ -510,6 +565,8 @@ public String toString() {
510565
.append("\n");
511566
sb.append(" checkLetterScreen: ").append(toIndentedString(checkLetterScreen)).append("\n");
512567
sb.append(" checkSecurityText: ").append(toIndentedString(checkSecurityText)).append("\n");
568+
sb.append(" checkProperties: ").append(toIndentedString(checkProperties)).append("\n");
569+
sb.append(" propertiesParams: ").append(toIndentedString(propertiesParams)).append("\n");
513570
sb.append("}");
514571
return sb.toString();
515572
}
@@ -547,7 +604,9 @@ private String toIndentedString(Object o) {
547604
"checkPhotoEmbedding",
548605
"checkPhotoComparison",
549606
"checkLetterScreen",
550-
"checkSecurityText"));
607+
"checkSecurityText",
608+
"checkProperties",
609+
"propertiesParams"));
551610

552611
// a set of required properties/fields (JSON key names)
553612
openapiRequiredFields = new HashSet<String>(0);
@@ -575,6 +634,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
575634
if (jsonObj.get("livenessParams") != null && !jsonObj.get("livenessParams").isJsonNull()) {
576635
LivenessParams.validateJsonElement(jsonObj.get("livenessParams"));
577636
}
637+
// validate the optional field `propertiesParams`
638+
if (jsonObj.get("propertiesParams") != null && !jsonObj.get("propertiesParams").isJsonNull()) {
639+
PropertiesParams.validateJsonElement(jsonObj.get("propertiesParams"));
640+
}
578641
}
579642

580643
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ public enum AuthenticityResultType {
9090
EXTENDED_MRZ_CHECK(8388608l),
9191

9292
/** Encrypted IPI */
93-
ENCRYPTED_IPI(16777216l);
93+
ENCRYPTED_IPI(16777216l),
94+
95+
/** Document property check */
96+
PROPERTY(33554432l);
9497

9598
private Long value;
9699

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,13 @@ public enum CheckDiagnose {
282282

283283
CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT(248),
284284

285-
CHD_INCORRECT_OBJECT_COLOR(250);
285+
CHD_INCORRECT_OBJECT_COLOR(250),
286+
287+
PROPERTY_NO_SIGNATURE(260),
288+
289+
PROPERTY_TEXT_AS_SIGNATURE(261),
290+
291+
PROPERTY_FINGERPRINT_AS_SIGNATURE(262);
286292

287293
private Integer value;
288294

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
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: 8.1.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+
import com.google.gson.Gson;
16+
import com.google.gson.JsonElement;
17+
import com.google.gson.JsonObject;
18+
import com.google.gson.TypeAdapter;
19+
import com.google.gson.TypeAdapterFactory;
20+
import com.google.gson.annotations.SerializedName;
21+
import com.google.gson.reflect.TypeToken;
22+
import com.google.gson.stream.JsonReader;
23+
import com.google.gson.stream.JsonWriter;
24+
import com.regula.documentreader.webclient.JSON;
25+
import java.io.IOException;
26+
import java.util.Arrays;
27+
import java.util.HashSet;
28+
import java.util.Objects;
29+
30+
/** PropertiesParams */
31+
@javax.annotation.Generated(
32+
value = "org.openapitools.codegen.languages.JavaClientCodegen",
33+
comments = "Generator version: 7.15.0")
34+
public class PropertiesParams {
35+
public static final String SERIALIZED_NAME_CHECK_HOLDERS_SIGNATURE = "checkHoldersSignature";
36+
37+
@SerializedName(SERIALIZED_NAME_CHECK_HOLDERS_SIGNATURE)
38+
@javax.annotation.Nullable
39+
private Boolean checkHoldersSignature;
40+
41+
public PropertiesParams() {}
42+
43+
public PropertiesParams checkHoldersSignature(
44+
@javax.annotation.Nullable Boolean checkHoldersSignature) {
45+
this.checkHoldersSignature = checkHoldersSignature;
46+
return this;
47+
}
48+
49+
/**
50+
* Set to true to enable detection of the document holder’s signature.
51+
*
52+
* @return checkHoldersSignature
53+
*/
54+
@javax.annotation.Nullable
55+
public Boolean getCheckHoldersSignature() {
56+
return checkHoldersSignature;
57+
}
58+
59+
public void setCheckHoldersSignature(@javax.annotation.Nullable Boolean checkHoldersSignature) {
60+
this.checkHoldersSignature = checkHoldersSignature;
61+
}
62+
63+
@Override
64+
public boolean equals(Object o) {
65+
if (this == o) {
66+
return true;
67+
}
68+
if (o == null || getClass() != o.getClass()) {
69+
return false;
70+
}
71+
PropertiesParams propertiesParams = (PropertiesParams) o;
72+
return Objects.equals(this.checkHoldersSignature, propertiesParams.checkHoldersSignature);
73+
}
74+
75+
@Override
76+
public int hashCode() {
77+
return Objects.hash(checkHoldersSignature);
78+
}
79+
80+
@Override
81+
public String toString() {
82+
StringBuilder sb = new StringBuilder();
83+
sb.append("class PropertiesParams {\n");
84+
sb.append(" checkHoldersSignature: ")
85+
.append(toIndentedString(checkHoldersSignature))
86+
.append("\n");
87+
sb.append("}");
88+
return sb.toString();
89+
}
90+
91+
/**
92+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
93+
*/
94+
private String toIndentedString(Object o) {
95+
if (o == null) {
96+
return "null";
97+
}
98+
return o.toString().replace("\n", "\n ");
99+
}
100+
101+
public static HashSet<String> openapiFields;
102+
public static HashSet<String> openapiRequiredFields;
103+
104+
static {
105+
// a set of all properties/fields (JSON key names)
106+
openapiFields = new HashSet<String>(Arrays.asList("checkHoldersSignature"));
107+
108+
// a set of required properties/fields (JSON key names)
109+
openapiRequiredFields = new HashSet<String>(0);
110+
}
111+
112+
/**
113+
* Validates the JSON Element and throws an exception if issues found
114+
*
115+
* @param jsonElement JSON Element
116+
* @throws IOException if the JSON Element is invalid with respect to PropertiesParams
117+
*/
118+
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
119+
if (jsonElement == null) {
120+
if (!PropertiesParams.openapiRequiredFields
121+
.isEmpty()) { // has required fields but JSON element is null
122+
System.err.println(
123+
String.format(
124+
"The required field(s) %s in PropertiesParams is not found in the empty JSON string",
125+
PropertiesParams.openapiRequiredFields.toString()));
126+
}
127+
}
128+
129+
JsonObject jsonObj = jsonElement.getAsJsonObject();
130+
}
131+
132+
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
133+
@SuppressWarnings("unchecked")
134+
@Override
135+
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
136+
if (!PropertiesParams.class.isAssignableFrom(type.getRawType())) {
137+
return null; // this class only serializes 'PropertiesParams' and its subtypes
138+
}
139+
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
140+
final TypeAdapter<PropertiesParams> thisAdapter =
141+
gson.getDelegateAdapter(this, TypeToken.get(PropertiesParams.class));
142+
143+
return (TypeAdapter<T>)
144+
new TypeAdapter<PropertiesParams>() {
145+
@Override
146+
public void write(JsonWriter out, PropertiesParams value) throws IOException {
147+
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
148+
elementAdapter.write(out, obj);
149+
}
150+
151+
@Override
152+
public PropertiesParams read(JsonReader in) throws IOException {
153+
JsonElement jsonElement = elementAdapter.read(in);
154+
validateJsonElement(jsonElement);
155+
return thisAdapter.fromJsonTree(jsonElement);
156+
}
157+
}.nullSafe();
158+
}
159+
}
160+
161+
/**
162+
* Create an instance of PropertiesParams given an JSON string
163+
*
164+
* @param jsonString JSON string
165+
* @return An instance of PropertiesParams
166+
* @throws IOException if the JSON string is invalid with respect to PropertiesParams
167+
*/
168+
public static PropertiesParams fromJson(String jsonString) throws IOException {
169+
return JSON.getGson().fromJson(jsonString, PropertiesParams.class);
170+
}
171+
172+
/**
173+
* Convert an instance of PropertiesParams to an JSON string
174+
*
175+
* @return JSON string
176+
*/
177+
public String toJson() {
178+
return JSON.getGson().toJson(this);
179+
}
180+
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ public enum SecurityFeatureType {
207207
PORTRAIT_COMPARISON_GHOST_VS_LIVE(60),
208208

209209
/** External vs ghost portrait comparison */
210-
PORTRAIT_COMPARISON_EXT_VS_GHOST(61);
210+
PORTRAIT_COMPARISON_EXT_VS_GHOST(61),
211+
212+
/** Signature presence */
213+
SIGNATURE_PRESENCE(62);
211214

212215
private Integer value;
213216

0 commit comments

Comments
 (0)