Skip to content

Commit d5be216

Browse files
SP-18211 - update models
1 parent b8d19ec commit d5be216

File tree

7 files changed

+43
-85
lines changed

7 files changed

+43
-85
lines changed

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ public class OCRSecurityTextItem {
5353

5454
@SerializedName(SERIALIZED_NAME_ETALON_RESULT_TYPE)
5555
@javax.annotation.Nonnull
56-
private Integer etalonResultType;
56+
private Integer etalonResultType = 0;
5757

5858
public static final String SERIALIZED_NAME_ETALON_FIELD_TYPE = "EtalonFieldType";
5959

6060
@SerializedName(SERIALIZED_NAME_ETALON_FIELD_TYPE)
6161
@javax.annotation.Nonnull
62-
private Integer etalonFieldType;
62+
private TextFieldType etalonFieldType;
6363

6464
public static final String SERIALIZED_NAME_ETALON_LIGHT_TYPE = "EtalonLightType";
6565

6666
@SerializedName(SERIALIZED_NAME_ETALON_LIGHT_TYPE)
6767
@javax.annotation.Nonnull
68-
private Integer etalonLightType;
68+
private Light etalonLightType;
6969

7070
public static final String SERIALIZED_NAME_ETALON_FIELD_RECT = "EtalonFieldRect";
7171

@@ -168,7 +168,7 @@ public OCRSecurityTextItem etalonResultType(@javax.annotation.Nonnull Integer et
168168
}
169169

170170
/**
171-
* Get etalonResultType
171+
* Same as Result type, but used for safe parsing of not-described values. See Result type.
172172
*
173173
* @return etalonResultType
174174
*/
@@ -181,7 +181,8 @@ public void setEtalonResultType(@javax.annotation.Nonnull Integer etalonResultTy
181181
this.etalonResultType = etalonResultType;
182182
}
183183

184-
public OCRSecurityTextItem etalonFieldType(@javax.annotation.Nonnull Integer etalonFieldType) {
184+
public OCRSecurityTextItem etalonFieldType(
185+
@javax.annotation.Nonnull TextFieldType etalonFieldType) {
185186
this.etalonFieldType = etalonFieldType;
186187
return this;
187188
}
@@ -192,15 +193,15 @@ public OCRSecurityTextItem etalonFieldType(@javax.annotation.Nonnull Integer eta
192193
* @return etalonFieldType
193194
*/
194195
@javax.annotation.Nonnull
195-
public Integer getEtalonFieldType() {
196+
public TextFieldType getEtalonFieldType() {
196197
return etalonFieldType;
197198
}
198199

199-
public void setEtalonFieldType(@javax.annotation.Nonnull Integer etalonFieldType) {
200+
public void setEtalonFieldType(@javax.annotation.Nonnull TextFieldType etalonFieldType) {
200201
this.etalonFieldType = etalonFieldType;
201202
}
202203

203-
public OCRSecurityTextItem etalonLightType(@javax.annotation.Nonnull Integer etalonLightType) {
204+
public OCRSecurityTextItem etalonLightType(@javax.annotation.Nonnull Light etalonLightType) {
204205
this.etalonLightType = etalonLightType;
205206
return this;
206207
}
@@ -211,11 +212,11 @@ public OCRSecurityTextItem etalonLightType(@javax.annotation.Nonnull Integer eta
211212
* @return etalonLightType
212213
*/
213214
@javax.annotation.Nonnull
214-
public Integer getEtalonLightType() {
215+
public Light getEtalonLightType() {
215216
return etalonLightType;
216217
}
217218

218-
public void setEtalonLightType(@javax.annotation.Nonnull Integer etalonLightType) {
219+
public void setEtalonLightType(@javax.annotation.Nonnull Light etalonLightType) {
219220
this.etalonLightType = etalonLightType;
220221
}
221222

@@ -472,6 +473,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
472473
Light.validateJsonElement(jsonObj.get("LightType"));
473474
// validate the required field `FieldRect`
474475
RectangleCoordinates.validateJsonElement(jsonObj.get("FieldRect"));
476+
// validate the required field `EtalonFieldType`
477+
TextFieldType.validateJsonElement(jsonObj.get("EtalonFieldType"));
478+
// validate the required field `EtalonLightType`
479+
Light.validateJsonElement(jsonObj.get("EtalonLightType"));
475480
// validate the required field `EtalonFieldRect`
476481
RectangleCoordinates.validateJsonElement(jsonObj.get("EtalonFieldRect"));
477482
if (!jsonObj.get("SecurityTextResultOCR").isJsonPrimitive()) {

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@ public class OCRSecurityTextResult extends AuthenticityCheckResultItem {
5353

5454
@SerializedName(SERIALIZED_NAME_ETALON_RESULT_TYPE)
5555
@javax.annotation.Nonnull
56-
private Integer etalonResultType;
56+
private Integer etalonResultType = 0;
5757

5858
public static final String SERIALIZED_NAME_ETALON_FIELD_TYPE = "EtalonFieldType";
5959

6060
@SerializedName(SERIALIZED_NAME_ETALON_FIELD_TYPE)
6161
@javax.annotation.Nonnull
62-
private Integer etalonFieldType;
62+
private TextFieldType etalonFieldType;
6363

6464
public static final String SERIALIZED_NAME_ETALON_LIGHT_TYPE = "EtalonLightType";
6565

6666
@SerializedName(SERIALIZED_NAME_ETALON_LIGHT_TYPE)
6767
@javax.annotation.Nonnull
68-
private Integer etalonLightType;
68+
private Light etalonLightType;
6969

7070
public static final String SERIALIZED_NAME_ETALON_FIELD_RECT = "EtalonFieldRect";
7171

@@ -169,7 +169,7 @@ public OCRSecurityTextResult etalonResultType(
169169
}
170170

171171
/**
172-
* Get etalonResultType
172+
* Same as Result type, but used for safe parsing of not-described values. See Result type.
173173
*
174174
* @return etalonResultType
175175
*/
@@ -182,7 +182,8 @@ public void setEtalonResultType(@javax.annotation.Nonnull Integer etalonResultTy
182182
this.etalonResultType = etalonResultType;
183183
}
184184

185-
public OCRSecurityTextResult etalonFieldType(@javax.annotation.Nonnull Integer etalonFieldType) {
185+
public OCRSecurityTextResult etalonFieldType(
186+
@javax.annotation.Nonnull TextFieldType etalonFieldType) {
186187
this.etalonFieldType = etalonFieldType;
187188
return this;
188189
}
@@ -193,15 +194,15 @@ public OCRSecurityTextResult etalonFieldType(@javax.annotation.Nonnull Integer e
193194
* @return etalonFieldType
194195
*/
195196
@javax.annotation.Nonnull
196-
public Integer getEtalonFieldType() {
197+
public TextFieldType getEtalonFieldType() {
197198
return etalonFieldType;
198199
}
199200

200-
public void setEtalonFieldType(@javax.annotation.Nonnull Integer etalonFieldType) {
201+
public void setEtalonFieldType(@javax.annotation.Nonnull TextFieldType etalonFieldType) {
201202
this.etalonFieldType = etalonFieldType;
202203
}
203204

204-
public OCRSecurityTextResult etalonLightType(@javax.annotation.Nonnull Integer etalonLightType) {
205+
public OCRSecurityTextResult etalonLightType(@javax.annotation.Nonnull Light etalonLightType) {
205206
this.etalonLightType = etalonLightType;
206207
return this;
207208
}
@@ -212,11 +213,11 @@ public OCRSecurityTextResult etalonLightType(@javax.annotation.Nonnull Integer e
212213
* @return etalonLightType
213214
*/
214215
@javax.annotation.Nonnull
215-
public Integer getEtalonLightType() {
216+
public Light getEtalonLightType() {
216217
return etalonLightType;
217218
}
218219

219-
public void setEtalonLightType(@javax.annotation.Nonnull Integer etalonLightType) {
220+
public void setEtalonLightType(@javax.annotation.Nonnull Light etalonLightType) {
220221
this.etalonLightType = etalonLightType;
221222
}
222223

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class PArrayField {
8080

8181
@SerializedName(SERIALIZED_NAME_BC_TEXT_FIELD_TYPE)
8282
@javax.annotation.Nullable
83-
private Integer bcTextFieldType;
83+
private TextFieldType bcTextFieldType;
8484

8585
public static final String SERIALIZED_NAME_BC_TYPE_D_E_C_O_D_E = "bcType_DECODE";
8686

@@ -237,7 +237,7 @@ public void setBcTextDecoderTypes(@javax.annotation.Nullable Integer bcTextDecod
237237
this.bcTextDecoderTypes = bcTextDecoderTypes;
238238
}
239239

240-
public PArrayField bcTextFieldType(@javax.annotation.Nullable Integer bcTextFieldType) {
240+
public PArrayField bcTextFieldType(@javax.annotation.Nullable TextFieldType bcTextFieldType) {
241241
this.bcTextFieldType = bcTextFieldType;
242242
return this;
243243
}
@@ -248,11 +248,11 @@ public PArrayField bcTextFieldType(@javax.annotation.Nullable Integer bcTextFiel
248248
* @return bcTextFieldType
249249
*/
250250
@javax.annotation.Nullable
251-
public Integer getBcTextFieldType() {
251+
public TextFieldType getBcTextFieldType() {
252252
return bcTextFieldType;
253253
}
254254

255-
public void setBcTextFieldType(@javax.annotation.Nullable Integer bcTextFieldType) {
255+
public void setBcTextFieldType(@javax.annotation.Nullable TextFieldType bcTextFieldType) {
256256
this.bcTextFieldType = bcTextFieldType;
257257
}
258258

@@ -433,6 +433,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
433433
}
434434
// validate the required field `bcROI_DETECT`
435435
BcROIDETECT.validateJsonElement(jsonObj.get("bcROI_DETECT"));
436+
// validate the optional field `bcTextFieldType`
437+
if (jsonObj.get("bcTextFieldType") != null && !jsonObj.get("bcTextFieldType").isJsonNull()) {
438+
TextFieldType.validateJsonElement(jsonObj.get("bcTextFieldType"));
439+
}
436440
// validate the required field `bcType_DECODE`
437441
BarcodeType.validateJsonElement(jsonObj.get("bcType_DECODE"));
438442
}

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public class ProcessParams {
322322

323323
@SerializedName(SERIALIZED_NAME_PROCESS_AUTH)
324324
@javax.annotation.Nullable
325-
private AuthenticityResultType processAuth;
325+
private Long processAuth;
326326

327327
public static final String SERIALIZED_NAME_DEVICE_ID = "deviceId";
328328

@@ -1434,7 +1434,7 @@ public void setDocumentGroupFilter(
14341434
this.documentGroupFilter = documentGroupFilter;
14351435
}
14361436

1437-
public ProcessParams processAuth(@javax.annotation.Nullable AuthenticityResultType processAuth) {
1437+
public ProcessParams processAuth(@javax.annotation.Nullable Long processAuth) {
14381438
this.processAuth = processAuth;
14391439
return this;
14401440
}
@@ -1445,11 +1445,11 @@ public ProcessParams processAuth(@javax.annotation.Nullable AuthenticityResultTy
14451445
* @return processAuth
14461446
*/
14471447
@javax.annotation.Nullable
1448-
public AuthenticityResultType getProcessAuth() {
1448+
public Long getProcessAuth() {
14491449
return processAuth;
14501450
}
14511451

1452-
public void setProcessAuth(@javax.annotation.Nullable AuthenticityResultType processAuth) {
1452+
public void setProcessAuth(@javax.annotation.Nullable Long processAuth) {
14531453
this.processAuth = processAuth;
14541454
}
14551455

@@ -2256,10 +2256,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
22562256
"Expected the field `documentGroupFilter` to be an array in the JSON string but got `%s`",
22572257
jsonObj.get("documentGroupFilter").toString()));
22582258
}
2259-
// validate the optional field `processAuth`
2260-
if (jsonObj.get("processAuth") != null && !jsonObj.get("processAuth").isJsonNull()) {
2261-
AuthenticityResultType.validateJsonElement(jsonObj.get("processAuth"));
2262-
}
22632259
if ((jsonObj.get("deviceTypeHex") != null && !jsonObj.get("deviceTypeHex").isJsonNull())
22642260
&& !jsonObj.get("deviceTypeHex").isJsonPrimitive()) {
22652261
throw new IllegalArgumentException(

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

Lines changed: 2 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,6 @@ public class ProcessRequest {
108108
@javax.annotation.Nullable
109109
private List<String> imageUrls;
110110

111-
public static final String SERIALIZED_NAME_LCID_FILTER = "lcidFilter";
112-
113-
@SerializedName(SERIALIZED_NAME_LCID_FILTER)
114-
@javax.annotation.Nullable
115-
private List<LCID> lcidFilter;
116-
117111
public ProcessRequest() {}
118112

119113
public ProcessRequest processParam(@javax.annotation.Nonnull ProcessParams processParam) {
@@ -370,34 +364,6 @@ public void setImageUrls(@javax.annotation.Nullable List<String> imageUrls) {
370364
this.imageUrls = imageUrls;
371365
}
372366

373-
public ProcessRequest lcidFilter(@javax.annotation.Nullable List<LCID> lcidFilter) {
374-
this.lcidFilter = lcidFilter;
375-
return this;
376-
}
377-
378-
public ProcessRequest addLcidFilterItem(LCID lcidFilterItem) {
379-
if (this.lcidFilter == null) {
380-
this.lcidFilter = new ArrayList<>();
381-
}
382-
this.lcidFilter.add(lcidFilterItem);
383-
return this;
384-
}
385-
386-
/**
387-
* The list of LCID types to recognize. If empty, values with all LCID types will be extracted.
388-
* Empty by default.
389-
*
390-
* @return lcidFilter
391-
*/
392-
@javax.annotation.Nullable
393-
public List<LCID> getLcidFilter() {
394-
return lcidFilter;
395-
}
396-
397-
public void setLcidFilter(@javax.annotation.Nullable List<LCID> lcidFilter) {
398-
this.lcidFilter = lcidFilter;
399-
}
400-
401367
@Override
402368
public boolean equals(Object o) {
403369
if (this == o) {
@@ -418,8 +384,7 @@ public boolean equals(Object o) {
418384
&& Objects.equals(this.systemInfo, processRequest.systemInfo)
419385
&& Objects.equals(this.passBackObject, processRequest.passBackObject)
420386
&& Objects.equals(this.dtc, processRequest.dtc)
421-
&& Objects.equals(this.imageUrls, processRequest.imageUrls)
422-
&& Objects.equals(this.lcidFilter, processRequest.lcidFilter);
387+
&& Objects.equals(this.imageUrls, processRequest.imageUrls);
423388
}
424389

425390
@Override
@@ -436,8 +401,7 @@ public int hashCode() {
436401
systemInfo,
437402
passBackObject,
438403
dtc,
439-
imageUrls,
440-
lcidFilter);
404+
imageUrls);
441405
}
442406

443407
@Override
@@ -456,7 +420,6 @@ public String toString() {
456420
sb.append(" passBackObject: ").append(toIndentedString(passBackObject)).append("\n");
457421
sb.append(" dtc: ").append(toIndentedString(dtc)).append("\n");
458422
sb.append(" imageUrls: ").append(toIndentedString(imageUrls)).append("\n");
459-
sb.append(" lcidFilter: ").append(toIndentedString(lcidFilter)).append("\n");
460423
sb.append("}");
461424
return sb.toString();
462425
}
@@ -489,7 +452,6 @@ private String toIndentedString(Object o) {
489452
openapiFields.add("passBackObject");
490453
openapiFields.add("dtc");
491454
openapiFields.add("ImageUrls");
492-
openapiFields.add("lcidFilter");
493455

494456
// a set of required properties/fields (JSON key names)
495457
openapiRequiredFields = new HashSet<String>();
@@ -602,15 +564,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
602564
"Expected the field `ImageUrls` to be an array in the JSON string but got `%s`",
603565
jsonObj.get("ImageUrls").toString()));
604566
}
605-
// ensure the optional json data is an array if present
606-
if (jsonObj.get("lcidFilter") != null
607-
&& !jsonObj.get("lcidFilter").isJsonNull()
608-
&& !jsonObj.get("lcidFilter").isJsonArray()) {
609-
throw new IllegalArgumentException(
610-
String.format(
611-
"Expected the field `lcidFilter` to be an array in the JSON string but got `%s`",
612-
jsonObj.get("lcidFilter").toString()));
613-
}
614567
}
615568

616569
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ public enum Result {
109109
/** Contains license */
110110
LICENSE(50),
111111

112-
/** Contains result of DocumentPosition */
112+
/** Contains result of MRZ position */
113113
MRZ_POSITION(61),
114114

115-
/** Contains result of DocumentPosition */
115+
/** Contains result of barcode position */
116116
BARCODE_POSITION(62),
117117

118118
/** Contains information about document position on the input image, its center, angle, etc */

client/src/main/java/com/regula/documentreader/webclient/model/ext/RecognitionParams.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.regula.documentreader.webclient.model.ext;
22

33
import com.regula.documentreader.webclient.model.AuthParams;
4-
import com.regula.documentreader.webclient.model.AuthenticityResultType;
54
import com.regula.documentreader.webclient.model.DocumentFormat;
65
import com.regula.documentreader.webclient.model.DocumentType;
76
import com.regula.documentreader.webclient.model.FaceApi;
@@ -246,7 +245,7 @@ public RecognitionParams withDocumentGroupFilter(List<DocumentType> documentGrou
246245
return this;
247246
}
248247

249-
public RecognitionParams withProcessAuth(AuthenticityResultType processAuth) {
248+
public RecognitionParams withProcessAuth(Long processAuth) {
250249
this.setProcessAuth(processAuth);
251250
return this;
252251
}

0 commit comments

Comments
 (0)