Skip to content

Commit 404f5e4

Browse files
SP-23182 - update models
1 parent 6fd5654 commit 404f5e4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class ChosenDocumentType {
3535
public static final String SERIALIZED_NAME_DOCUMENT_NAME = "DocumentName";
3636

3737
@SerializedName(SERIALIZED_NAME_DOCUMENT_NAME)
38-
@javax.annotation.Nonnull
38+
@javax.annotation.Nullable
3939
private String documentName;
4040

4141
public static final String SERIALIZED_NAME_I_D = "ID";
@@ -107,7 +107,7 @@ public class ChosenDocumentType {
107107

108108
public ChosenDocumentType() {}
109109

110-
public ChosenDocumentType documentName(@javax.annotation.Nonnull String documentName) {
110+
public ChosenDocumentType documentName(@javax.annotation.Nullable String documentName) {
111111
this.documentName = documentName;
112112
return this;
113113
}
@@ -117,12 +117,12 @@ public ChosenDocumentType documentName(@javax.annotation.Nonnull String document
117117
*
118118
* @return documentName
119119
*/
120-
@javax.annotation.Nonnull
120+
@javax.annotation.Nullable
121121
public String getDocumentName() {
122122
return documentName;
123123
}
124124

125-
public void setDocumentName(@javax.annotation.Nonnull String documentName) {
125+
public void setDocumentName(@javax.annotation.Nullable String documentName) {
126126
this.documentName = documentName;
127127
}
128128

@@ -437,7 +437,6 @@ private String toIndentedString(Object o) {
437437

438438
// a set of required properties/fields (JSON key names)
439439
openapiRequiredFields = new HashSet<String>();
440-
openapiRequiredFields.add("DocumentName");
441440
openapiRequiredFields.add("ID");
442441
openapiRequiredFields.add("P");
443442
openapiRequiredFields.add("Rotated180");
@@ -476,7 +475,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
476475
}
477476
}
478477
JsonObject jsonObj = jsonElement.getAsJsonObject();
479-
if (!jsonObj.get("DocumentName").isJsonPrimitive()) {
478+
if ((jsonObj.get("DocumentName") != null && !jsonObj.get("DocumentName").isJsonNull())
479+
&& !jsonObj.get("DocumentName").isJsonPrimitive()) {
480480
throw new IllegalArgumentException(
481481
String.format(
482482
"Expected the field `DocumentName` to be a primitive type in the JSON string but got `%s`",

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class OneCandidate {
3535
public static final String SERIALIZED_NAME_DOCUMENT_NAME = "DocumentName";
3636

3737
@SerializedName(SERIALIZED_NAME_DOCUMENT_NAME)
38-
@javax.annotation.Nonnull
38+
@javax.annotation.Nullable
3939
private String documentName;
4040

4141
public static final String SERIALIZED_NAME_I_D = "ID";
@@ -107,7 +107,7 @@ public class OneCandidate {
107107

108108
public OneCandidate() {}
109109

110-
public OneCandidate documentName(@javax.annotation.Nonnull String documentName) {
110+
public OneCandidate documentName(@javax.annotation.Nullable String documentName) {
111111
this.documentName = documentName;
112112
return this;
113113
}
@@ -117,12 +117,12 @@ public OneCandidate documentName(@javax.annotation.Nonnull String documentName)
117117
*
118118
* @return documentName
119119
*/
120-
@javax.annotation.Nonnull
120+
@javax.annotation.Nullable
121121
public String getDocumentName() {
122122
return documentName;
123123
}
124124

125-
public void setDocumentName(@javax.annotation.Nonnull String documentName) {
125+
public void setDocumentName(@javax.annotation.Nullable String documentName) {
126126
this.documentName = documentName;
127127
}
128128

@@ -437,7 +437,6 @@ private String toIndentedString(Object o) {
437437

438438
// a set of required properties/fields (JSON key names)
439439
openapiRequiredFields = new HashSet<String>();
440-
openapiRequiredFields.add("DocumentName");
441440
openapiRequiredFields.add("ID");
442441
openapiRequiredFields.add("P");
443442
openapiRequiredFields.add("Rotated180");
@@ -476,7 +475,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
476475
}
477476
}
478477
JsonObject jsonObj = jsonElement.getAsJsonObject();
479-
if (!jsonObj.get("DocumentName").isJsonPrimitive()) {
478+
if ((jsonObj.get("DocumentName") != null && !jsonObj.get("DocumentName").isJsonNull())
479+
&& !jsonObj.get("DocumentName").isJsonPrimitive()) {
480480
throw new IllegalArgumentException(
481481
String.format(
482482
"Expected the field `DocumentName` to be a primitive type in the JSON string but got `%s`",

0 commit comments

Comments
 (0)