Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ src/main/generated/com/regula/documentreader/webclient/model/ProcessRequestImage
src/main/generated/com/regula/documentreader/webclient/model/ProcessResponse.java
src/main/generated/com/regula/documentreader/webclient/model/ProcessSystemInfo.java
src/main/generated/com/regula/documentreader/webclient/model/ProcessingStatus.java
src/main/generated/com/regula/documentreader/webclient/model/PropertiesParams.java
src/main/generated/com/regula/documentreader/webclient/model/RFIDDocVisualExtendedField.java
src/main/generated/com/regula/documentreader/webclient/model/RFIDDocVisualExtendedFieldItem.java
src/main/generated/com/regula/documentreader/webclient/model/RFIDDocVisualExtendedInfo.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,8 @@ private static Class getClassByDiscriminator(
new com.regula.documentreader.webclient.model.ProcessResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.regula.documentreader.webclient.model.ProcessSystemInfo.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.regula.documentreader.webclient.model.PropertiesParams.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.regula.documentreader.webclient.model.RFIDDocVisualExtendedField
.CustomTypeAdapterFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ public class AuthParams {
@javax.annotation.Nullable
private Boolean checkSecurityText;

public static final String SERIALIZED_NAME_CHECK_PROPERTIES = "checkProperties";

@SerializedName(SERIALIZED_NAME_CHECK_PROPERTIES)
@javax.annotation.Nullable
private Boolean checkProperties;

public static final String SERIALIZED_NAME_PROPERTIES_PARAMS = "propertiesParams";

@SerializedName(SERIALIZED_NAME_PROPERTIES_PARAMS)
@javax.annotation.Nullable
private PropertiesParams propertiesParams;

public AuthParams() {}

public AuthParams checkLiveness(@javax.annotation.Nullable Boolean checkLiveness) {
Expand Down Expand Up @@ -436,6 +448,45 @@ public void setCheckSecurityText(@javax.annotation.Nullable Boolean checkSecurit
this.checkSecurityText = checkSecurityText;
}

public AuthParams checkProperties(@javax.annotation.Nullable Boolean checkProperties) {
this.checkProperties = checkProperties;
return this;
}

/**
* Set to true to enable detection of the document properties, such as holder's signature and
* other attributes.
*
* @return checkProperties
*/
@javax.annotation.Nullable
public Boolean getCheckProperties() {
return checkProperties;
}

public void setCheckProperties(@javax.annotation.Nullable Boolean checkProperties) {
this.checkProperties = checkProperties;
}

public AuthParams propertiesParams(@javax.annotation.Nullable PropertiesParams propertiesParams) {
this.propertiesParams = propertiesParams;
return this;
}

/**
* Get propertiesParams
*
* @return propertiesParams
*/
@javax.annotation.Nullable
public PropertiesParams getPropertiesParams() {
return propertiesParams;
}

public void setPropertiesParams(@javax.annotation.Nullable PropertiesParams propertiesParams) {
this.propertiesParams = propertiesParams;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -460,7 +511,9 @@ public boolean equals(Object o) {
&& Objects.equals(this.checkPhotoEmbedding, authParams.checkPhotoEmbedding)
&& Objects.equals(this.checkPhotoComparison, authParams.checkPhotoComparison)
&& Objects.equals(this.checkLetterScreen, authParams.checkLetterScreen)
&& Objects.equals(this.checkSecurityText, authParams.checkSecurityText);
&& Objects.equals(this.checkSecurityText, authParams.checkSecurityText)
&& Objects.equals(this.checkProperties, authParams.checkProperties)
&& Objects.equals(this.propertiesParams, authParams.propertiesParams);
}

@Override
Expand All @@ -481,7 +534,9 @@ public int hashCode() {
checkPhotoEmbedding,
checkPhotoComparison,
checkLetterScreen,
checkSecurityText);
checkSecurityText,
checkProperties,
propertiesParams);
}

@Override
Expand Down Expand Up @@ -510,6 +565,8 @@ public String toString() {
.append("\n");
sb.append(" checkLetterScreen: ").append(toIndentedString(checkLetterScreen)).append("\n");
sb.append(" checkSecurityText: ").append(toIndentedString(checkSecurityText)).append("\n");
sb.append(" checkProperties: ").append(toIndentedString(checkProperties)).append("\n");
sb.append(" propertiesParams: ").append(toIndentedString(propertiesParams)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down Expand Up @@ -547,7 +604,9 @@ private String toIndentedString(Object o) {
"checkPhotoEmbedding",
"checkPhotoComparison",
"checkLetterScreen",
"checkSecurityText"));
"checkSecurityText",
"checkProperties",
"propertiesParams"));

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

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ public enum AuthenticityResultType {
EXTENDED_MRZ_CHECK(8388608l),

/** Encrypted IPI */
ENCRYPTED_IPI(16777216l);
ENCRYPTED_IPI(16777216l),

/** Document property check */
PROPERTY(33554432l);

private Long value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,13 @@ public enum CheckDiagnose {

CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT(248),

CHD_INCORRECT_OBJECT_COLOR(250);
CHD_INCORRECT_OBJECT_COLOR(250),

PROPERTY_NO_SIGNATURE(260),

PROPERTY_TEXT_AS_SIGNATURE(261),

PROPERTY_FINGERPRINT_AS_SIGNATURE(262);

private Integer value;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
/*
* 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: 8.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

package com.regula.documentreader.webclient.model;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.regula.documentreader.webclient.JSON;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Objects;

/** PropertiesParams */
@javax.annotation.Generated(
value = "org.openapitools.codegen.languages.JavaClientCodegen",
comments = "Generator version: 7.15.0")
public class PropertiesParams {
public static final String SERIALIZED_NAME_CHECK_HOLDERS_SIGNATURE = "checkHoldersSignature";

@SerializedName(SERIALIZED_NAME_CHECK_HOLDERS_SIGNATURE)
@javax.annotation.Nullable
private Boolean checkHoldersSignature;

public PropertiesParams() {}

public PropertiesParams checkHoldersSignature(
@javax.annotation.Nullable Boolean checkHoldersSignature) {
this.checkHoldersSignature = checkHoldersSignature;
return this;
}

/**
* Set to true to enable detection of the document holder’s signature.
*
* @return checkHoldersSignature
*/
@javax.annotation.Nullable
public Boolean getCheckHoldersSignature() {
return checkHoldersSignature;
}

public void setCheckHoldersSignature(@javax.annotation.Nullable Boolean checkHoldersSignature) {
this.checkHoldersSignature = checkHoldersSignature;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PropertiesParams propertiesParams = (PropertiesParams) o;
return Objects.equals(this.checkHoldersSignature, propertiesParams.checkHoldersSignature);
}

@Override
public int hashCode() {
return Objects.hash(checkHoldersSignature);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PropertiesParams {\n");
sb.append(" checkHoldersSignature: ")
.append(toIndentedString(checkHoldersSignature))
.append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}

public static HashSet<String> openapiFields;
public static HashSet<String> openapiRequiredFields;

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("checkHoldersSignature"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
}

/**
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
* @throws IOException if the JSON Element is invalid with respect to PropertiesParams
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!PropertiesParams.openapiRequiredFields
.isEmpty()) { // has required fields but JSON element is null
System.err.println(
String.format(
"The required field(s) %s in PropertiesParams is not found in the empty JSON string",
PropertiesParams.openapiRequiredFields.toString()));
}
}

JsonObject jsonObj = jsonElement.getAsJsonObject();
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
if (!PropertiesParams.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'PropertiesParams' and its subtypes
}
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter<PropertiesParams> thisAdapter =
gson.getDelegateAdapter(this, TypeToken.get(PropertiesParams.class));

return (TypeAdapter<T>)
new TypeAdapter<PropertiesParams>() {
@Override
public void write(JsonWriter out, PropertiesParams value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
elementAdapter.write(out, obj);
}

@Override
public PropertiesParams read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
}
}

/**
* Create an instance of PropertiesParams given an JSON string
*
* @param jsonString JSON string
* @return An instance of PropertiesParams
* @throws IOException if the JSON string is invalid with respect to PropertiesParams
*/
public static PropertiesParams fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, PropertiesParams.class);
}

/**
* Convert an instance of PropertiesParams to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ public enum SecurityFeatureType {
PORTRAIT_COMPARISON_GHOST_VS_LIVE(60),

/** External vs ghost portrait comparison */
PORTRAIT_COMPARISON_EXT_VS_GHOST(61);
PORTRAIT_COMPARISON_EXT_VS_GHOST(61),

/** Signature presence */
SIGNATURE_PRESENCE(62);

private Integer value;

Expand Down