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 @@ -154,6 +154,7 @@ src/main/generated/com/regula/documentreader/webclient/model/MrzDetectModeEnum.j
src/main/generated/com/regula/documentreader/webclient/model/MrzPositionItem.java
src/main/generated/com/regula/documentreader/webclient/model/OCRSecurityTextItem.java
src/main/generated/com/regula/documentreader/webclient/model/OCRSecurityTextResult.java
src/main/generated/com/regula/documentreader/webclient/model/OcclusionCheckParams.java
src/main/generated/com/regula/documentreader/webclient/model/OneCandidate.java
src/main/generated/com/regula/documentreader/webclient/model/OneCandidateItem.java
src/main/generated/com/regula/documentreader/webclient/model/OriginalSymbol.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,9 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.regula.documentreader.webclient.model.OCRSecurityTextResult
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.regula.documentreader.webclient.model.OcclusionCheckParams
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.regula.documentreader.webclient.model.OneCandidate.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ public class ImageQA {
@javax.annotation.Nullable
private GlaresCheckParams glaresCheckParams;

public static final String SERIALIZED_NAME_OCCLUSION_CHECK_PARAMS = "occlusionCheckParams";

@SerializedName(SERIALIZED_NAME_OCCLUSION_CHECK_PARAMS)
@javax.annotation.Nullable
private OcclusionCheckParams occlusionCheckParams;

public ImageQA() {}

public ImageQA brightnessThreshold(@javax.annotation.Nullable Double brightnessThreshold) {
Expand Down Expand Up @@ -300,6 +306,27 @@ public void setGlaresCheckParams(@javax.annotation.Nullable GlaresCheckParams gl
this.glaresCheckParams = glaresCheckParams;
}

public ImageQA occlusionCheckParams(
@javax.annotation.Nullable OcclusionCheckParams occlusionCheckParams) {
this.occlusionCheckParams = occlusionCheckParams;
return this;
}

/**
* Get occlusionCheckParams
*
* @return occlusionCheckParams
*/
@javax.annotation.Nullable
public OcclusionCheckParams getOcclusionCheckParams() {
return occlusionCheckParams;
}

public void setOcclusionCheckParams(
@javax.annotation.Nullable OcclusionCheckParams occlusionCheckParams) {
this.occlusionCheckParams = occlusionCheckParams;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -318,7 +345,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.moireCheck, imageQA.moireCheck)
&& Objects.equals(this.documentPositionIndent, imageQA.documentPositionIndent)
&& Objects.equals(this.expectedPass, imageQA.expectedPass)
&& Objects.equals(this.glaresCheckParams, imageQA.glaresCheckParams);
&& Objects.equals(this.glaresCheckParams, imageQA.glaresCheckParams)
&& Objects.equals(this.occlusionCheckParams, imageQA.occlusionCheckParams);
}

@Override
Expand All @@ -333,7 +361,8 @@ public int hashCode() {
moireCheck,
documentPositionIndent,
expectedPass,
glaresCheckParams);
glaresCheckParams,
occlusionCheckParams);
}

@Override
Expand All @@ -354,6 +383,9 @@ public String toString() {
.append("\n");
sb.append(" expectedPass: ").append(toIndentedString(expectedPass)).append("\n");
sb.append(" glaresCheckParams: ").append(toIndentedString(glaresCheckParams)).append("\n");
sb.append(" occlusionCheckParams: ")
.append(toIndentedString(occlusionCheckParams))
.append("\n");
sb.append("}");
return sb.toString();
}
Expand Down Expand Up @@ -385,7 +417,8 @@ private String toIndentedString(Object o) {
"moireCheck",
"documentPositionIndent",
"expectedPass",
"glaresCheckParams"));
"glaresCheckParams",
"occlusionCheckParams"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
Expand Down Expand Up @@ -423,6 +456,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
&& !jsonObj.get("glaresCheckParams").isJsonNull()) {
GlaresCheckParams.validateJsonElement(jsonObj.get("glaresCheckParams"));
}
// validate the optional field `occlusionCheckParams`
if (jsonObj.get("occlusionCheckParams") != null
&& !jsonObj.get("occlusionCheckParams").isJsonNull()) {
OcclusionCheckParams.validateJsonElement(jsonObj.get("occlusionCheckParams"));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
/*
* Regula Document Reader Web API
* Fast and reliable identity document verification for on-premises installation or cloud integration. # 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 # Documentation Go to [Regula Developer Documentation](https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service) to read the technologies description, licensing information, release notes, and instructions on the integration, installation, migration, etc. # Technical Support To submit a request to the Support Team, visit [Regula Help Center](https://support.regulaforensics.com/hc/en-us/requests/new). # Business Enquiries To discuss business opportunities, fill the [Enquiry Form](https://explore.regula.app/docs-support-request) and specify your scenarios, applications, and technical requirements.
*
* 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;

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

@SerializedName(SERIALIZED_NAME_MAX_OCCLUSION_PART)
@javax.annotation.Nullable
private Float maxOcclusionPart;

public OcclusionCheckParams() {}

public OcclusionCheckParams maxOcclusionPart(@javax.annotation.Nullable Float maxOcclusionPart) {
this.maxOcclusionPart = maxOcclusionPart;
return this;
}

/**
* The maximum size for the occluded area of a document; only those exceeding this size will be
* validated
*
* @return maxOcclusionPart
*/
@javax.annotation.Nullable
public Float getMaxOcclusionPart() {
return maxOcclusionPart;
}

public void setMaxOcclusionPart(@javax.annotation.Nullable Float maxOcclusionPart) {
this.maxOcclusionPart = maxOcclusionPart;
}

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

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

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OcclusionCheckParams {\n");
sb.append(" maxOcclusionPart: ").append(toIndentedString(maxOcclusionPart)).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("maxOcclusionPart"));

// 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 OcclusionCheckParams
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!OcclusionCheckParams.openapiRequiredFields
.isEmpty()) { // has required fields but JSON element is null
System.err.println(
String.format(
"The required field(s) %s in OcclusionCheckParams is not found in the empty JSON string",
OcclusionCheckParams.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 (!OcclusionCheckParams.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'OcclusionCheckParams' and its subtypes
}
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter<OcclusionCheckParams> thisAdapter =
gson.getDelegateAdapter(this, TypeToken.get(OcclusionCheckParams.class));

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

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

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

/**
* Convert an instance of OcclusionCheckParams to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}
Loading