diff --git a/client/.openapi-generator/FILES b/client/.openapi-generator/FILES index e931ffe..241a200 100755 --- a/client/.openapi-generator/FILES +++ b/client/.openapi-generator/FILES @@ -134,7 +134,6 @@ src/main/generated/com/regula/documentreader/webclient/model/MRZTestQualityItem. src/main/generated/com/regula/documentreader/webclient/model/MRZTestQualityResult.java src/main/generated/com/regula/documentreader/webclient/model/MeasureSystem.java src/main/generated/com/regula/documentreader/webclient/model/MrzDetectModeEnum.java -src/main/generated/com/regula/documentreader/webclient/model/MrzPosition.java 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 diff --git a/client/src/main/generated/com/regula/documentreader/webclient/JSON.java b/client/src/main/generated/com/regula/documentreader/webclient/JSON.java index 4ab8931..fcb28a9 100755 --- a/client/src/main/generated/com/regula/documentreader/webclient/JSON.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/JSON.java @@ -1189,8 +1189,6 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new com.regula.documentreader.webclient.model.MRZTestQualityResult .CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory( - new com.regula.documentreader.webclient.model.MrzPosition.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.regula.documentreader.webclient.model.MrzPositionItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/Light.java b/client/src/main/generated/com/regula/documentreader/webclient/model/Light.java index 327993f..1e5c77b 100644 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/Light.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/model/Light.java @@ -26,10 +26,10 @@ public enum Light { /** No Light */ OFF(0), - /** Upper/lower lighters of white light scheme */ + /** Upper/lower white */ WHITE_TOP(2), - /** Side lighters of white light scheme */ + /** Side white */ WHITE_SIDE(4), /** White */ @@ -41,7 +41,7 @@ public enum Light { /** Ultraviolet */ UV(128), - /** White coaxial */ + /** Axial white */ AXIAL_WHITE(3072); private Integer value; diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/MRZPositionResult.java b/client/src/main/generated/com/regula/documentreader/webclient/model/MRZPositionResult.java index 54aec7f..3f0bcc1 100644 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/MRZPositionResult.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/model/MRZPositionResult.java @@ -35,11 +35,11 @@ public class MRZPositionResult extends ResultItem { @SerializedName(SERIALIZED_NAME_MRZ_POSITION) @javax.annotation.Nonnull - private MrzPosition mrzPosition; + private DocumentPosition mrzPosition; public MRZPositionResult() {} - public MRZPositionResult mrzPosition(@javax.annotation.Nonnull MrzPosition mrzPosition) { + public MRZPositionResult mrzPosition(@javax.annotation.Nonnull DocumentPosition mrzPosition) { this.mrzPosition = mrzPosition; return this; } @@ -50,11 +50,11 @@ public MRZPositionResult mrzPosition(@javax.annotation.Nonnull MrzPosition mrzPo * @return mrzPosition */ @javax.annotation.Nonnull - public MrzPosition getMrzPosition() { + public DocumentPosition getMrzPosition() { return mrzPosition; } - public void setMrzPosition(@javax.annotation.Nonnull MrzPosition mrzPosition) { + public void setMrzPosition(@javax.annotation.Nonnull DocumentPosition mrzPosition) { this.mrzPosition = mrzPosition; } diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/MRZTestQuality.java b/client/src/main/generated/com/regula/documentreader/webclient/model/MRZTestQuality.java index faa123d..7729bf8 100644 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/MRZTestQuality.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/model/MRZTestQuality.java @@ -38,13 +38,13 @@ public class MRZTestQuality { @SerializedName(SERIALIZED_NAME_C_H_E_C_K_S_U_M_S) @javax.annotation.Nonnull - private Integer CHECK_SUMS; + private CheckResult CHECK_SUMS; public static final String SERIALIZED_NAME_C_O_N_T_R_A_S_T_P_R_I_N_T = "CONTRAST_PRINT"; @SerializedName(SERIALIZED_NAME_C_O_N_T_R_A_S_T_P_R_I_N_T) @javax.annotation.Nonnull - private Integer CONTRAST_PRINT; + private CheckResult CONTRAST_PRINT; public static final String SERIALIZED_NAME_D_O_C_F_O_R_M_A_T = "DOC_FORMAT"; @@ -62,19 +62,19 @@ public class MRZTestQuality { @SerializedName(SERIALIZED_NAME_P_R_I_N_T_P_O_S_I_T_I_O_N) @javax.annotation.Nonnull - private Integer PRINT_POSITION; + private CheckResult PRINT_POSITION; public static final String SERIALIZED_NAME_S_T_A_I_N_M_R_Z = "STAIN_MRZ"; @SerializedName(SERIALIZED_NAME_S_T_A_I_N_M_R_Z) @javax.annotation.Nonnull - private Integer STAIN_MRZ; + private CheckResult STAIN_MRZ; public static final String SERIALIZED_NAME_S_Y_M_B_O_L_S_P_A_R_A_M = "SYMBOLS_PARAM"; @SerializedName(SERIALIZED_NAME_S_Y_M_B_O_L_S_P_A_R_A_M) @javax.annotation.Nonnull - private Integer SYMBOLS_PARAM; + private CheckResult SYMBOLS_PARAM; public static final String SERIALIZED_NAME_STR_COUNT = "StrCount"; @@ -92,11 +92,11 @@ public class MRZTestQuality { @SerializedName(SERIALIZED_NAME_T_E_X_T_U_A_L_F_I_L_L_I_N_G) @javax.annotation.Nonnull - private Integer TEXTUAL_FILLING; + private CheckResult TEXTUAL_FILLING; public MRZTestQuality() {} - public MRZTestQuality CHECK_SUMS(@javax.annotation.Nonnull Integer CHECK_SUMS) { + public MRZTestQuality CHECK_SUMS(@javax.annotation.Nonnull CheckResult CHECK_SUMS) { this.CHECK_SUMS = CHECK_SUMS; return this; } @@ -107,15 +107,15 @@ public MRZTestQuality CHECK_SUMS(@javax.annotation.Nonnull Integer CHECK_SUMS) { * @return CHECK_SUMS */ @javax.annotation.Nonnull - public Integer getCHECKSUMS() { + public CheckResult getCHECKSUMS() { return CHECK_SUMS; } - public void setCHECKSUMS(@javax.annotation.Nonnull Integer CHECK_SUMS) { + public void setCHECKSUMS(@javax.annotation.Nonnull CheckResult CHECK_SUMS) { this.CHECK_SUMS = CHECK_SUMS; } - public MRZTestQuality CONTRAST_PRINT(@javax.annotation.Nonnull Integer CONTRAST_PRINT) { + public MRZTestQuality CONTRAST_PRINT(@javax.annotation.Nonnull CheckResult CONTRAST_PRINT) { this.CONTRAST_PRINT = CONTRAST_PRINT; return this; } @@ -126,11 +126,11 @@ public MRZTestQuality CONTRAST_PRINT(@javax.annotation.Nonnull Integer CONTRAST_ * @return CONTRAST_PRINT */ @javax.annotation.Nonnull - public Integer getCONTRASTPRINT() { + public CheckResult getCONTRASTPRINT() { return CONTRAST_PRINT; } - public void setCONTRASTPRINT(@javax.annotation.Nonnull Integer CONTRAST_PRINT) { + public void setCONTRASTPRINT(@javax.annotation.Nonnull CheckResult CONTRAST_PRINT) { this.CONTRAST_PRINT = CONTRAST_PRINT; } @@ -172,7 +172,7 @@ public void setMRZFORMAT(@javax.annotation.Nonnull Integer MRZ_FORMAT) { this.MRZ_FORMAT = MRZ_FORMAT; } - public MRZTestQuality PRINT_POSITION(@javax.annotation.Nonnull Integer PRINT_POSITION) { + public MRZTestQuality PRINT_POSITION(@javax.annotation.Nonnull CheckResult PRINT_POSITION) { this.PRINT_POSITION = PRINT_POSITION; return this; } @@ -183,15 +183,15 @@ public MRZTestQuality PRINT_POSITION(@javax.annotation.Nonnull Integer PRINT_POS * @return PRINT_POSITION */ @javax.annotation.Nonnull - public Integer getPRINTPOSITION() { + public CheckResult getPRINTPOSITION() { return PRINT_POSITION; } - public void setPRINTPOSITION(@javax.annotation.Nonnull Integer PRINT_POSITION) { + public void setPRINTPOSITION(@javax.annotation.Nonnull CheckResult PRINT_POSITION) { this.PRINT_POSITION = PRINT_POSITION; } - public MRZTestQuality STAIN_MRZ(@javax.annotation.Nonnull Integer STAIN_MRZ) { + public MRZTestQuality STAIN_MRZ(@javax.annotation.Nonnull CheckResult STAIN_MRZ) { this.STAIN_MRZ = STAIN_MRZ; return this; } @@ -202,15 +202,15 @@ public MRZTestQuality STAIN_MRZ(@javax.annotation.Nonnull Integer STAIN_MRZ) { * @return STAIN_MRZ */ @javax.annotation.Nonnull - public Integer getSTAINMRZ() { + public CheckResult getSTAINMRZ() { return STAIN_MRZ; } - public void setSTAINMRZ(@javax.annotation.Nonnull Integer STAIN_MRZ) { + public void setSTAINMRZ(@javax.annotation.Nonnull CheckResult STAIN_MRZ) { this.STAIN_MRZ = STAIN_MRZ; } - public MRZTestQuality SYMBOLS_PARAM(@javax.annotation.Nonnull Integer SYMBOLS_PARAM) { + public MRZTestQuality SYMBOLS_PARAM(@javax.annotation.Nonnull CheckResult SYMBOLS_PARAM) { this.SYMBOLS_PARAM = SYMBOLS_PARAM; return this; } @@ -221,11 +221,11 @@ public MRZTestQuality SYMBOLS_PARAM(@javax.annotation.Nonnull Integer SYMBOLS_PA * @return SYMBOLS_PARAM */ @javax.annotation.Nonnull - public Integer getSYMBOLSPARAM() { + public CheckResult getSYMBOLSPARAM() { return SYMBOLS_PARAM; } - public void setSYMBOLSPARAM(@javax.annotation.Nonnull Integer SYMBOLS_PARAM) { + public void setSYMBOLSPARAM(@javax.annotation.Nonnull CheckResult SYMBOLS_PARAM) { this.SYMBOLS_PARAM = SYMBOLS_PARAM; } @@ -275,7 +275,7 @@ public void setStrings(@javax.annotation.Nonnull List strings) { this.strings = strings; } - public MRZTestQuality TEXTUAL_FILLING(@javax.annotation.Nonnull Integer TEXTUAL_FILLING) { + public MRZTestQuality TEXTUAL_FILLING(@javax.annotation.Nonnull CheckResult TEXTUAL_FILLING) { this.TEXTUAL_FILLING = TEXTUAL_FILLING; return this; } @@ -286,11 +286,11 @@ public MRZTestQuality TEXTUAL_FILLING(@javax.annotation.Nonnull Integer TEXTUAL_ * @return TEXTUAL_FILLING */ @javax.annotation.Nonnull - public Integer getTEXTUALFILLING() { + public CheckResult getTEXTUALFILLING() { return TEXTUAL_FILLING; } - public void setTEXTUALFILLING(@javax.annotation.Nonnull Integer TEXTUAL_FILLING) { + public void setTEXTUALFILLING(@javax.annotation.Nonnull CheckResult TEXTUAL_FILLING) { this.TEXTUAL_FILLING = TEXTUAL_FILLING; } @@ -416,6 +416,16 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `CHECK_SUMS` + CheckResult.validateJsonElement(jsonObj.get("CHECK_SUMS")); + // validate the required field `CONTRAST_PRINT` + CheckResult.validateJsonElement(jsonObj.get("CONTRAST_PRINT")); + // validate the required field `PRINT_POSITION` + CheckResult.validateJsonElement(jsonObj.get("PRINT_POSITION")); + // validate the required field `STAIN_MRZ` + CheckResult.validateJsonElement(jsonObj.get("STAIN_MRZ")); + // validate the required field `SYMBOLS_PARAM` + CheckResult.validateJsonElement(jsonObj.get("SYMBOLS_PARAM")); // ensure the json data is an array if (!jsonObj.get("Strings").isJsonArray()) { throw new IllegalArgumentException( @@ -430,6 +440,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti StringItem.validateJsonElement(jsonArraystrings.get(i)); } ; + // validate the required field `TEXTUAL_FILLING` + CheckResult.validateJsonElement(jsonObj.get("TEXTUAL_FILLING")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/MrzPosition.java b/client/src/main/generated/com/regula/documentreader/webclient/model/MrzPosition.java deleted file mode 100644 index def9c81..0000000 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/MrzPosition.java +++ /dev/null @@ -1,616 +0,0 @@ -/* - * 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.math.BigDecimal; -import java.util.HashSet; -import java.util.Objects; - -/** MrzPosition */ -@javax.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.13.0") -public class MrzPosition { - public static final String SERIALIZED_NAME_DOC_FORMAT = "docFormat"; - - @SerializedName(SERIALIZED_NAME_DOC_FORMAT) - @javax.annotation.Nonnull - private DocumentFormat docFormat; - - public static final String SERIALIZED_NAME_ANGLE = "Angle"; - - @SerializedName(SERIALIZED_NAME_ANGLE) - @javax.annotation.Nonnull - private BigDecimal angle; - - public static final String SERIALIZED_NAME_WIDTH = "Width"; - - @SerializedName(SERIALIZED_NAME_WIDTH) - @javax.annotation.Nonnull - private Integer width; - - public static final String SERIALIZED_NAME_HEIGHT = "Height"; - - @SerializedName(SERIALIZED_NAME_HEIGHT) - @javax.annotation.Nonnull - private Integer height; - - public static final String SERIALIZED_NAME_CENTER = "Center"; - - @SerializedName(SERIALIZED_NAME_CENTER) - @javax.annotation.Nonnull - private Point center; - - public static final String SERIALIZED_NAME_LEFT_BOTTOM = "LeftBottom"; - - @SerializedName(SERIALIZED_NAME_LEFT_BOTTOM) - @javax.annotation.Nonnull - private Point leftBottom; - - public static final String SERIALIZED_NAME_LEFT_TOP = "LeftTop"; - - @SerializedName(SERIALIZED_NAME_LEFT_TOP) - @javax.annotation.Nonnull - private Point leftTop; - - public static final String SERIALIZED_NAME_RIGHT_BOTTOM = "RightBottom"; - - @SerializedName(SERIALIZED_NAME_RIGHT_BOTTOM) - @javax.annotation.Nonnull - private Point rightBottom; - - public static final String SERIALIZED_NAME_RIGHT_TOP = "RightTop"; - - @SerializedName(SERIALIZED_NAME_RIGHT_TOP) - @javax.annotation.Nonnull - private Point rightTop; - - public static final String SERIALIZED_NAME_DPI = "Dpi"; - - @SerializedName(SERIALIZED_NAME_DPI) - @javax.annotation.Nonnull - private Integer dpi; - - public static final String SERIALIZED_NAME_INVERSE = "Inverse"; - - @SerializedName(SERIALIZED_NAME_INVERSE) - @javax.annotation.Nullable - private Integer inverse; - - public static final String SERIALIZED_NAME_OBJ_AREA = "ObjArea"; - - @SerializedName(SERIALIZED_NAME_OBJ_AREA) - @javax.annotation.Nullable - private Integer objArea; - - public static final String SERIALIZED_NAME_OBJ_INT_ANGLE_DEV = "ObjIntAngleDev"; - - @SerializedName(SERIALIZED_NAME_OBJ_INT_ANGLE_DEV) - @javax.annotation.Nullable - private Integer objIntAngleDev; - - public static final String SERIALIZED_NAME_PERSPECTIVE_TR = "PerspectiveTr"; - - @SerializedName(SERIALIZED_NAME_PERSPECTIVE_TR) - @javax.annotation.Nullable - private Integer perspectiveTr; - - public static final String SERIALIZED_NAME_RESULT_STATUS = "ResultStatus"; - - @SerializedName(SERIALIZED_NAME_RESULT_STATUS) - @javax.annotation.Nullable - private Integer resultStatus; - - public MrzPosition() {} - - public MrzPosition docFormat(@javax.annotation.Nonnull DocumentFormat docFormat) { - this.docFormat = docFormat; - return this; - } - - /** - * Get docFormat - * - * @return docFormat - */ - @javax.annotation.Nonnull - public DocumentFormat getDocFormat() { - return docFormat; - } - - public void setDocFormat(@javax.annotation.Nonnull DocumentFormat docFormat) { - this.docFormat = docFormat; - } - - public MrzPosition angle(@javax.annotation.Nonnull BigDecimal angle) { - this.angle = angle; - return this; - } - - /** - * Document rotation angle - * - * @return angle - */ - @javax.annotation.Nonnull - public BigDecimal getAngle() { - return angle; - } - - public void setAngle(@javax.annotation.Nonnull BigDecimal angle) { - this.angle = angle; - } - - public MrzPosition width(@javax.annotation.Nonnull Integer width) { - this.width = width; - return this; - } - - /** - * Document width - * - * @return width - */ - @javax.annotation.Nonnull - public Integer getWidth() { - return width; - } - - public void setWidth(@javax.annotation.Nonnull Integer width) { - this.width = width; - } - - public MrzPosition height(@javax.annotation.Nonnull Integer height) { - this.height = height; - return this; - } - - /** - * Document height - * - * @return height - */ - @javax.annotation.Nonnull - public Integer getHeight() { - return height; - } - - public void setHeight(@javax.annotation.Nonnull Integer height) { - this.height = height; - } - - public MrzPosition center(@javax.annotation.Nonnull Point center) { - this.center = center; - return this; - } - - /** - * Get center - * - * @return center - */ - @javax.annotation.Nonnull - public Point getCenter() { - return center; - } - - public void setCenter(@javax.annotation.Nonnull Point center) { - this.center = center; - } - - public MrzPosition leftBottom(@javax.annotation.Nonnull Point leftBottom) { - this.leftBottom = leftBottom; - return this; - } - - /** - * Get leftBottom - * - * @return leftBottom - */ - @javax.annotation.Nonnull - public Point getLeftBottom() { - return leftBottom; - } - - public void setLeftBottom(@javax.annotation.Nonnull Point leftBottom) { - this.leftBottom = leftBottom; - } - - public MrzPosition leftTop(@javax.annotation.Nonnull Point leftTop) { - this.leftTop = leftTop; - return this; - } - - /** - * Get leftTop - * - * @return leftTop - */ - @javax.annotation.Nonnull - public Point getLeftTop() { - return leftTop; - } - - public void setLeftTop(@javax.annotation.Nonnull Point leftTop) { - this.leftTop = leftTop; - } - - public MrzPosition rightBottom(@javax.annotation.Nonnull Point rightBottom) { - this.rightBottom = rightBottom; - return this; - } - - /** - * Get rightBottom - * - * @return rightBottom - */ - @javax.annotation.Nonnull - public Point getRightBottom() { - return rightBottom; - } - - public void setRightBottom(@javax.annotation.Nonnull Point rightBottom) { - this.rightBottom = rightBottom; - } - - public MrzPosition rightTop(@javax.annotation.Nonnull Point rightTop) { - this.rightTop = rightTop; - return this; - } - - /** - * Get rightTop - * - * @return rightTop - */ - @javax.annotation.Nonnull - public Point getRightTop() { - return rightTop; - } - - public void setRightTop(@javax.annotation.Nonnull Point rightTop) { - this.rightTop = rightTop; - } - - public MrzPosition dpi(@javax.annotation.Nonnull Integer dpi) { - this.dpi = dpi; - return this; - } - - /** - * Get dpi - * - * @return dpi - */ - @javax.annotation.Nonnull - public Integer getDpi() { - return dpi; - } - - public void setDpi(@javax.annotation.Nonnull Integer dpi) { - this.dpi = dpi; - } - - public MrzPosition inverse(@javax.annotation.Nullable Integer inverse) { - this.inverse = inverse; - return this; - } - - /** - * Get inverse - * - * @return inverse - */ - @javax.annotation.Nullable - public Integer getInverse() { - return inverse; - } - - public void setInverse(@javax.annotation.Nullable Integer inverse) { - this.inverse = inverse; - } - - public MrzPosition objArea(@javax.annotation.Nullable Integer objArea) { - this.objArea = objArea; - return this; - } - - /** - * Get objArea - * - * @return objArea - */ - @javax.annotation.Nullable - public Integer getObjArea() { - return objArea; - } - - public void setObjArea(@javax.annotation.Nullable Integer objArea) { - this.objArea = objArea; - } - - public MrzPosition objIntAngleDev(@javax.annotation.Nullable Integer objIntAngleDev) { - this.objIntAngleDev = objIntAngleDev; - return this; - } - - /** - * Get objIntAngleDev - * - * @return objIntAngleDev - */ - @javax.annotation.Nullable - public Integer getObjIntAngleDev() { - return objIntAngleDev; - } - - public void setObjIntAngleDev(@javax.annotation.Nullable Integer objIntAngleDev) { - this.objIntAngleDev = objIntAngleDev; - } - - public MrzPosition perspectiveTr(@javax.annotation.Nullable Integer perspectiveTr) { - this.perspectiveTr = perspectiveTr; - return this; - } - - /** - * Get perspectiveTr - * - * @return perspectiveTr - */ - @javax.annotation.Nullable - public Integer getPerspectiveTr() { - return perspectiveTr; - } - - public void setPerspectiveTr(@javax.annotation.Nullable Integer perspectiveTr) { - this.perspectiveTr = perspectiveTr; - } - - public MrzPosition resultStatus(@javax.annotation.Nullable Integer resultStatus) { - this.resultStatus = resultStatus; - return this; - } - - /** - * Get resultStatus - * - * @return resultStatus - */ - @javax.annotation.Nullable - public Integer getResultStatus() { - return resultStatus; - } - - public void setResultStatus(@javax.annotation.Nullable Integer resultStatus) { - this.resultStatus = resultStatus; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MrzPosition mrzPosition = (MrzPosition) o; - return Objects.equals(this.docFormat, mrzPosition.docFormat) - && Objects.equals(this.angle, mrzPosition.angle) - && Objects.equals(this.width, mrzPosition.width) - && Objects.equals(this.height, mrzPosition.height) - && Objects.equals(this.center, mrzPosition.center) - && Objects.equals(this.leftBottom, mrzPosition.leftBottom) - && Objects.equals(this.leftTop, mrzPosition.leftTop) - && Objects.equals(this.rightBottom, mrzPosition.rightBottom) - && Objects.equals(this.rightTop, mrzPosition.rightTop) - && Objects.equals(this.dpi, mrzPosition.dpi) - && Objects.equals(this.inverse, mrzPosition.inverse) - && Objects.equals(this.objArea, mrzPosition.objArea) - && Objects.equals(this.objIntAngleDev, mrzPosition.objIntAngleDev) - && Objects.equals(this.perspectiveTr, mrzPosition.perspectiveTr) - && Objects.equals(this.resultStatus, mrzPosition.resultStatus); - } - - @Override - public int hashCode() { - return Objects.hash( - docFormat, - angle, - width, - height, - center, - leftBottom, - leftTop, - rightBottom, - rightTop, - dpi, - inverse, - objArea, - objIntAngleDev, - perspectiveTr, - resultStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MrzPosition {\n"); - sb.append(" docFormat: ").append(toIndentedString(docFormat)).append("\n"); - sb.append(" angle: ").append(toIndentedString(angle)).append("\n"); - sb.append(" width: ").append(toIndentedString(width)).append("\n"); - sb.append(" height: ").append(toIndentedString(height)).append("\n"); - sb.append(" center: ").append(toIndentedString(center)).append("\n"); - sb.append(" leftBottom: ").append(toIndentedString(leftBottom)).append("\n"); - sb.append(" leftTop: ").append(toIndentedString(leftTop)).append("\n"); - sb.append(" rightBottom: ").append(toIndentedString(rightBottom)).append("\n"); - sb.append(" rightTop: ").append(toIndentedString(rightTop)).append("\n"); - sb.append(" dpi: ").append(toIndentedString(dpi)).append("\n"); - sb.append(" inverse: ").append(toIndentedString(inverse)).append("\n"); - sb.append(" objArea: ").append(toIndentedString(objArea)).append("\n"); - sb.append(" objIntAngleDev: ").append(toIndentedString(objIntAngleDev)).append("\n"); - sb.append(" perspectiveTr: ").append(toIndentedString(perspectiveTr)).append("\n"); - sb.append(" resultStatus: ").append(toIndentedString(resultStatus)).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 openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("docFormat"); - openapiFields.add("Angle"); - openapiFields.add("Width"); - openapiFields.add("Height"); - openapiFields.add("Center"); - openapiFields.add("LeftBottom"); - openapiFields.add("LeftTop"); - openapiFields.add("RightBottom"); - openapiFields.add("RightTop"); - openapiFields.add("Dpi"); - openapiFields.add("Inverse"); - openapiFields.add("ObjArea"); - openapiFields.add("ObjIntAngleDev"); - openapiFields.add("PerspectiveTr"); - openapiFields.add("ResultStatus"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("docFormat"); - openapiRequiredFields.add("Angle"); - openapiRequiredFields.add("Width"); - openapiRequiredFields.add("Height"); - openapiRequiredFields.add("Center"); - openapiRequiredFields.add("LeftBottom"); - openapiRequiredFields.add("LeftTop"); - openapiRequiredFields.add("RightBottom"); - openapiRequiredFields.add("RightTop"); - openapiRequiredFields.add("Dpi"); - } - - /** - * 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 MrzPosition - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MrzPosition.openapiRequiredFields - .isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException( - String.format( - "The required field(s) %s in MrzPosition is not found in the empty JSON string", - MrzPosition.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MrzPosition.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException( - String.format( - "The required field `%s` is not found in the JSON string: %s", - requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `docFormat` - DocumentFormat.validateJsonElement(jsonObj.get("docFormat")); - // validate the required field `Center` - Point.validateJsonElement(jsonObj.get("Center")); - // validate the required field `LeftBottom` - Point.validateJsonElement(jsonObj.get("LeftBottom")); - // validate the required field `LeftTop` - Point.validateJsonElement(jsonObj.get("LeftTop")); - // validate the required field `RightBottom` - Point.validateJsonElement(jsonObj.get("RightBottom")); - // validate the required field `RightTop` - Point.validateJsonElement(jsonObj.get("RightTop")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MrzPosition.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MrzPosition' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = - gson.getDelegateAdapter(this, TypeToken.get(MrzPosition.class)); - - return (TypeAdapter) - new TypeAdapter() { - @Override - public void write(JsonWriter out, MrzPosition value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MrzPosition read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - }.nullSafe(); - } - } - - /** - * Create an instance of MrzPosition given an JSON string - * - * @param jsonString JSON string - * @return An instance of MrzPosition - * @throws IOException if the JSON string is invalid with respect to MrzPosition - */ - public static MrzPosition fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MrzPosition.class); - } - - /** - * Convert an instance of MrzPosition to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/MrzPositionItem.java b/client/src/main/generated/com/regula/documentreader/webclient/model/MrzPositionItem.java index 0be337d..a5b1e4d 100644 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/MrzPositionItem.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/model/MrzPositionItem.java @@ -35,11 +35,11 @@ public class MrzPositionItem { @SerializedName(SERIALIZED_NAME_MRZ_POSITION) @javax.annotation.Nonnull - private MrzPosition mrzPosition; + private DocumentPosition mrzPosition; public MrzPositionItem() {} - public MrzPositionItem mrzPosition(@javax.annotation.Nonnull MrzPosition mrzPosition) { + public MrzPositionItem mrzPosition(@javax.annotation.Nonnull DocumentPosition mrzPosition) { this.mrzPosition = mrzPosition; return this; } @@ -50,11 +50,11 @@ public MrzPositionItem mrzPosition(@javax.annotation.Nonnull MrzPosition mrzPosi * @return mrzPosition */ @javax.annotation.Nonnull - public MrzPosition getMrzPosition() { + public DocumentPosition getMrzPosition() { return mrzPosition; } - public void setMrzPosition(@javax.annotation.Nonnull MrzPosition mrzPosition) { + public void setMrzPosition(@javax.annotation.Nonnull DocumentPosition mrzPosition) { this.mrzPosition = mrzPosition; } @@ -135,7 +135,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `MrzPosition` - MrzPosition.validateJsonElement(jsonObj.get("MrzPosition")); + DocumentPosition.validateJsonElement(jsonObj.get("MrzPosition")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/RfidDataFileType.java b/client/src/main/generated/com/regula/documentreader/webclient/model/RfidDataFileType.java index 3760059..2062218 100644 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/RfidDataFileType.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/model/RfidDataFileType.java @@ -177,9 +177,9 @@ public enum RfidDataFileType { DIR(401), - _E_SIGN_PK(500), + E_SIGN_PK(500), - _E_SIGN_SIGNED_DATA(501), + E_SIGN_SIGNED_DATA(501), CERTIFICATE(600), diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/StringItem.java b/client/src/main/generated/com/regula/documentreader/webclient/model/StringItem.java index 5c614c8..9084ce9 100644 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/StringItem.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/model/StringItem.java @@ -40,13 +40,13 @@ public class StringItem { @SerializedName(SERIALIZED_NAME_A_L_I_G_N_M_E_N_T_S_Y_M_B_O_L_S_I_N_S_T_R_I_N_G) @javax.annotation.Nonnull - private Integer ALIGNMENT_SYMBOLS_IN_STRING; + private CheckResult ALIGNMENT_SYMBOLS_IN_STRING; public static final String SERIALIZED_NAME_C_H_E_C_K_S_U_M_S = "CHECK_SUMS"; @SerializedName(SERIALIZED_NAME_C_H_E_C_K_S_U_M_S) @javax.annotation.Nonnull - private Integer CHECK_SUMS; + private CheckResult CHECK_SUMS; public static final String SERIALIZED_NAME_ERROR_P_O_S_I_T_I_O_N = "ErrorPOSITION"; @@ -70,31 +70,31 @@ public class StringItem { @SerializedName(SERIALIZED_NAME_S_T_R_I_N_G_S_D_I_S_T_A_N_C_E) @javax.annotation.Nonnull - private Integer STRINGS_DISTANCE; + private CheckResult STRINGS_DISTANCE; public static final String SERIALIZED_NAME_S_T_R_I_N_G_S_I_N_T_E_R_V_A_L = "STRINGS_INTERVAL"; @SerializedName(SERIALIZED_NAME_S_T_R_I_N_G_S_I_N_T_E_R_V_A_L) @javax.annotation.Nonnull - private Integer STRINGS_INTERVAL; + private CheckResult STRINGS_INTERVAL; public static final String SERIALIZED_NAME_S_T_R_I_N_G_F_I_L_L_I_N_G = "STRING_FILLING"; @SerializedName(SERIALIZED_NAME_S_T_R_I_N_G_F_I_L_L_I_N_G) @javax.annotation.Nonnull - private Integer STRING_FILLING; + private CheckResult STRING_FILLING; - public static final String SERIALIZED_NAME_S_T_R_I_N_G_P_O_S_I_T_I_O_N = "STRING_POSITION"; + public static final String SERIALIZED_NAME_S_T_R_I_N_G_S_P_O_S_I_T_I_O_N = "STRINGS_POSITION"; - @SerializedName(SERIALIZED_NAME_S_T_R_I_N_G_P_O_S_I_T_I_O_N) - @javax.annotation.Nonnull - private Integer STRING_POSITION; + @SerializedName(SERIALIZED_NAME_S_T_R_I_N_G_S_P_O_S_I_T_I_O_N) + @javax.annotation.Nullable + private CheckResult STRINGS_POSITION; public static final String SERIALIZED_NAME_S_Y_M_B_O_L_S_P_A_R_A_M = "SYMBOLS_PARAM"; @SerializedName(SERIALIZED_NAME_S_Y_M_B_O_L_S_P_A_R_A_M) @javax.annotation.Nonnull - private Integer SYMBOLS_PARAM; + private CheckResult SYMBOLS_PARAM; public static final String SERIALIZED_NAME_SIZE_ERROR_A_L_I_G_N_M_E_N_T = "SizeError_ALIGNMENT"; @@ -141,7 +141,7 @@ public class StringItem { public StringItem() {} public StringItem ALIGNMENT_SYMBOLS_IN_STRING( - @javax.annotation.Nonnull Integer ALIGNMENT_SYMBOLS_IN_STRING) { + @javax.annotation.Nonnull CheckResult ALIGNMENT_SYMBOLS_IN_STRING) { this.ALIGNMENT_SYMBOLS_IN_STRING = ALIGNMENT_SYMBOLS_IN_STRING; return this; } @@ -152,16 +152,16 @@ public StringItem ALIGNMENT_SYMBOLS_IN_STRING( * @return ALIGNMENT_SYMBOLS_IN_STRING */ @javax.annotation.Nonnull - public Integer getALIGNMENTSYMBOLSINSTRING() { + public CheckResult getALIGNMENTSYMBOLSINSTRING() { return ALIGNMENT_SYMBOLS_IN_STRING; } public void setALIGNMENTSYMBOLSINSTRING( - @javax.annotation.Nonnull Integer ALIGNMENT_SYMBOLS_IN_STRING) { + @javax.annotation.Nonnull CheckResult ALIGNMENT_SYMBOLS_IN_STRING) { this.ALIGNMENT_SYMBOLS_IN_STRING = ALIGNMENT_SYMBOLS_IN_STRING; } - public StringItem CHECK_SUMS(@javax.annotation.Nonnull Integer CHECK_SUMS) { + public StringItem CHECK_SUMS(@javax.annotation.Nonnull CheckResult CHECK_SUMS) { this.CHECK_SUMS = CHECK_SUMS; return this; } @@ -172,11 +172,11 @@ public StringItem CHECK_SUMS(@javax.annotation.Nonnull Integer CHECK_SUMS) { * @return CHECK_SUMS */ @javax.annotation.Nonnull - public Integer getCHECKSUMS() { + public CheckResult getCHECKSUMS() { return CHECK_SUMS; } - public void setCHECKSUMS(@javax.annotation.Nonnull Integer CHECK_SUMS) { + public void setCHECKSUMS(@javax.annotation.Nonnull CheckResult CHECK_SUMS) { this.CHECK_SUMS = CHECK_SUMS; } @@ -245,7 +245,7 @@ public void setFields(@javax.annotation.Nonnull List fields) { this.fields = fields; } - public StringItem STRINGS_DISTANCE(@javax.annotation.Nonnull Integer STRINGS_DISTANCE) { + public StringItem STRINGS_DISTANCE(@javax.annotation.Nonnull CheckResult STRINGS_DISTANCE) { this.STRINGS_DISTANCE = STRINGS_DISTANCE; return this; } @@ -256,15 +256,15 @@ public StringItem STRINGS_DISTANCE(@javax.annotation.Nonnull Integer STRINGS_DIS * @return STRINGS_DISTANCE */ @javax.annotation.Nonnull - public Integer getSTRINGSDISTANCE() { + public CheckResult getSTRINGSDISTANCE() { return STRINGS_DISTANCE; } - public void setSTRINGSDISTANCE(@javax.annotation.Nonnull Integer STRINGS_DISTANCE) { + public void setSTRINGSDISTANCE(@javax.annotation.Nonnull CheckResult STRINGS_DISTANCE) { this.STRINGS_DISTANCE = STRINGS_DISTANCE; } - public StringItem STRINGS_INTERVAL(@javax.annotation.Nonnull Integer STRINGS_INTERVAL) { + public StringItem STRINGS_INTERVAL(@javax.annotation.Nonnull CheckResult STRINGS_INTERVAL) { this.STRINGS_INTERVAL = STRINGS_INTERVAL; return this; } @@ -275,15 +275,15 @@ public StringItem STRINGS_INTERVAL(@javax.annotation.Nonnull Integer STRINGS_INT * @return STRINGS_INTERVAL */ @javax.annotation.Nonnull - public Integer getSTRINGSINTERVAL() { + public CheckResult getSTRINGSINTERVAL() { return STRINGS_INTERVAL; } - public void setSTRINGSINTERVAL(@javax.annotation.Nonnull Integer STRINGS_INTERVAL) { + public void setSTRINGSINTERVAL(@javax.annotation.Nonnull CheckResult STRINGS_INTERVAL) { this.STRINGS_INTERVAL = STRINGS_INTERVAL; } - public StringItem STRING_FILLING(@javax.annotation.Nonnull Integer STRING_FILLING) { + public StringItem STRING_FILLING(@javax.annotation.Nonnull CheckResult STRING_FILLING) { this.STRING_FILLING = STRING_FILLING; return this; } @@ -294,34 +294,34 @@ public StringItem STRING_FILLING(@javax.annotation.Nonnull Integer STRING_FILLIN * @return STRING_FILLING */ @javax.annotation.Nonnull - public Integer getSTRINGFILLING() { + public CheckResult getSTRINGFILLING() { return STRING_FILLING; } - public void setSTRINGFILLING(@javax.annotation.Nonnull Integer STRING_FILLING) { + public void setSTRINGFILLING(@javax.annotation.Nonnull CheckResult STRING_FILLING) { this.STRING_FILLING = STRING_FILLING; } - public StringItem STRING_POSITION(@javax.annotation.Nonnull Integer STRING_POSITION) { - this.STRING_POSITION = STRING_POSITION; + public StringItem STRINGS_POSITION(@javax.annotation.Nullable CheckResult STRINGS_POSITION) { + this.STRINGS_POSITION = STRINGS_POSITION; return this; } /** - * Get STRING_POSITION + * Get STRINGS_POSITION * - * @return STRING_POSITION + * @return STRINGS_POSITION */ - @javax.annotation.Nonnull - public Integer getSTRINGPOSITION() { - return STRING_POSITION; + @javax.annotation.Nullable + public CheckResult getSTRINGSPOSITION() { + return STRINGS_POSITION; } - public void setSTRINGPOSITION(@javax.annotation.Nonnull Integer STRING_POSITION) { - this.STRING_POSITION = STRING_POSITION; + public void setSTRINGSPOSITION(@javax.annotation.Nullable CheckResult STRINGS_POSITION) { + this.STRINGS_POSITION = STRINGS_POSITION; } - public StringItem SYMBOLS_PARAM(@javax.annotation.Nonnull Integer SYMBOLS_PARAM) { + public StringItem SYMBOLS_PARAM(@javax.annotation.Nonnull CheckResult SYMBOLS_PARAM) { this.SYMBOLS_PARAM = SYMBOLS_PARAM; return this; } @@ -332,11 +332,11 @@ public StringItem SYMBOLS_PARAM(@javax.annotation.Nonnull Integer SYMBOLS_PARAM) * @return SYMBOLS_PARAM */ @javax.annotation.Nonnull - public Integer getSYMBOLSPARAM() { + public CheckResult getSYMBOLSPARAM() { return SYMBOLS_PARAM; } - public void setSYMBOLSPARAM(@javax.annotation.Nonnull Integer SYMBOLS_PARAM) { + public void setSYMBOLSPARAM(@javax.annotation.Nonnull CheckResult SYMBOLS_PARAM) { this.SYMBOLS_PARAM = SYMBOLS_PARAM; } @@ -500,7 +500,7 @@ public boolean equals(Object o) { && Objects.equals(this.STRINGS_DISTANCE, stringItem.STRINGS_DISTANCE) && Objects.equals(this.STRINGS_INTERVAL, stringItem.STRINGS_INTERVAL) && Objects.equals(this.STRING_FILLING, stringItem.STRING_FILLING) - && Objects.equals(this.STRING_POSITION, stringItem.STRING_POSITION) + && Objects.equals(this.STRINGS_POSITION, stringItem.STRINGS_POSITION) && Objects.equals(this.SYMBOLS_PARAM, stringItem.SYMBOLS_PARAM) && Objects.equals(this.sizeErrorALIGNMENT, stringItem.sizeErrorALIGNMENT) && Objects.equals(this.sizeErrorDISTANCE, stringItem.sizeErrorDISTANCE) @@ -522,7 +522,7 @@ public int hashCode() { STRINGS_DISTANCE, STRINGS_INTERVAL, STRING_FILLING, - STRING_POSITION, + STRINGS_POSITION, SYMBOLS_PARAM, sizeErrorALIGNMENT, sizeErrorDISTANCE, @@ -547,7 +547,7 @@ public String toString() { sb.append(" STRINGS_DISTANCE: ").append(toIndentedString(STRINGS_DISTANCE)).append("\n"); sb.append(" STRINGS_INTERVAL: ").append(toIndentedString(STRINGS_INTERVAL)).append("\n"); sb.append(" STRING_FILLING: ").append(toIndentedString(STRING_FILLING)).append("\n"); - sb.append(" STRING_POSITION: ").append(toIndentedString(STRING_POSITION)).append("\n"); + sb.append(" STRINGS_POSITION: ").append(toIndentedString(STRINGS_POSITION)).append("\n"); sb.append(" SYMBOLS_PARAM: ").append(toIndentedString(SYMBOLS_PARAM)).append("\n"); sb.append(" sizeErrorALIGNMENT: ").append(toIndentedString(sizeErrorALIGNMENT)).append("\n"); sb.append(" sizeErrorDISTANCE: ").append(toIndentedString(sizeErrorDISTANCE)).append("\n"); @@ -584,7 +584,7 @@ private String toIndentedString(Object o) { openapiFields.add("STRINGS_DISTANCE"); openapiFields.add("STRINGS_INTERVAL"); openapiFields.add("STRING_FILLING"); - openapiFields.add("STRING_POSITION"); + openapiFields.add("STRINGS_POSITION"); openapiFields.add("SYMBOLS_PARAM"); openapiFields.add("SizeError_ALIGNMENT"); openapiFields.add("SizeError_DISTANCE"); @@ -604,7 +604,6 @@ private String toIndentedString(Object o) { openapiRequiredFields.add("STRINGS_DISTANCE"); openapiRequiredFields.add("STRINGS_INTERVAL"); openapiRequiredFields.add("STRING_FILLING"); - openapiRequiredFields.add("STRING_POSITION"); openapiRequiredFields.add("SYMBOLS_PARAM"); openapiRequiredFields.add("SizeError_ALIGNMENT"); openapiRequiredFields.add("SizeError_DISTANCE"); @@ -642,6 +641,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the required field `ALIGNMENT_SYMBOLS_IN_STRING` + CheckResult.validateJsonElement(jsonObj.get("ALIGNMENT_SYMBOLS_IN_STRING")); + // validate the required field `CHECK_SUMS` + CheckResult.validateJsonElement(jsonObj.get("CHECK_SUMS")); // validate the required field `ErrorPOSITION` ErrorCoordinates.validateJsonElement(jsonObj.get("ErrorPOSITION")); // ensure the json data is an array @@ -658,6 +661,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti FieldItem.validateJsonElement(jsonArrayfields.get(i)); } ; + // validate the required field `STRINGS_DISTANCE` + CheckResult.validateJsonElement(jsonObj.get("STRINGS_DISTANCE")); + // validate the required field `STRINGS_INTERVAL` + CheckResult.validateJsonElement(jsonObj.get("STRINGS_INTERVAL")); + // validate the required field `STRING_FILLING` + CheckResult.validateJsonElement(jsonObj.get("STRING_FILLING")); + // validate the optional field `STRINGS_POSITION` + if (jsonObj.get("STRINGS_POSITION") != null && !jsonObj.get("STRINGS_POSITION").isJsonNull()) { + CheckResult.validateJsonElement(jsonObj.get("STRINGS_POSITION")); + } + // validate the required field `SYMBOLS_PARAM` + CheckResult.validateJsonElement(jsonObj.get("SYMBOLS_PARAM")); // validate the required field `StringBorders` RectangleCoordinates.validateJsonElement(jsonObj.get("StringBorders")); // ensure the json data is an array diff --git a/client/src/main/generated/com/regula/documentreader/webclient/model/VisualExtendedFieldItem.java b/client/src/main/generated/com/regula/documentreader/webclient/model/VisualExtendedFieldItem.java index a03ce9b..b9c7e46 100644 --- a/client/src/main/generated/com/regula/documentreader/webclient/model/VisualExtendedFieldItem.java +++ b/client/src/main/generated/com/regula/documentreader/webclient/model/VisualExtendedFieldItem.java @@ -87,7 +87,7 @@ public class VisualExtendedFieldItem { @SerializedName(SERIALIZED_NAME_W_L_C_I_D) @javax.annotation.Nullable - private Integer wLCID; + private LCID wLCID; public static final String SERIALIZED_NAME_RESERVED2 = "Reserved2"; @@ -286,7 +286,7 @@ public void setInComparison(@javax.annotation.Nullable Integer inComparison) { this.inComparison = inComparison; } - public VisualExtendedFieldItem wLCID(@javax.annotation.Nullable Integer wLCID) { + public VisualExtendedFieldItem wLCID(@javax.annotation.Nullable LCID wLCID) { this.wLCID = wLCID; return this; } @@ -297,11 +297,11 @@ public VisualExtendedFieldItem wLCID(@javax.annotation.Nullable Integer wLCID) { * @return wLCID */ @javax.annotation.Nullable - public Integer getwLCID() { + public LCID getwLCID() { return wLCID; } - public void setwLCID(@javax.annotation.Nullable Integer wLCID) { + public void setwLCID(@javax.annotation.Nullable LCID wLCID) { this.wLCID = wLCID; } @@ -494,6 +494,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `FieldMask` to be a primitive type in the JSON string but got `%s`", jsonObj.get("FieldMask").toString())); } + // validate the optional field `wLCID` + if (jsonObj.get("wLCID") != null && !jsonObj.get("wLCID").isJsonNull()) { + LCID.validateJsonElement(jsonObj.get("wLCID")); + } } /**