diff --git a/client/src/main/generated/com/regula/facesdk/webclient/gen/api/MatchApi.java b/client/src/main/generated/com/regula/facesdk/webclient/gen/api/MatchApi.java index fa0f1fa..1dfede5 100644 --- a/client/src/main/generated/com/regula/facesdk/webclient/gen/api/MatchApi.java +++ b/client/src/main/generated/com/regula/facesdk/webclient/gen/api/MatchApi.java @@ -387,15 +387,17 @@ private okhttp3.Call matchValidateBeforeCall( * images, use POST `/api/match`. It's possible to compare faces in the same image * or in two different images, this is defined by the `images.type` parameter. * <br><br> Note that no more than two images of the same `type` are allowed - * for comparison.<br><br> The face detection result is displayed in the - * `detections` field. Each face is identified by two parameters: `faceIndex` - * (the index number of the face) and `imageIndex` (the index number of the image on - * which the face is detected). So, if there are two images each of which has two faces in them, - * the parameters will be the following: - First face in the first image: `faceIndex: - * 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, - * `imageIndex: 0` - First face of the second image: `faceIndex: 0`, - * `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, - * `imageIndex: 1` + * for comparison.<br><br> It's also possible to perform matching by using the + * face captured during the liveness check as one of the comparison inputs. In this case, pass + * `livenessTransactionId` instead of one of the images.<br><br> The face + * detection result is displayed in the `detections` field. Each face is identified by + * two parameters: `faceIndex` (the index number of the face) and `imageIndex` + * (the index number of the image on which the face is detected). So, if there are two images each + * of which has two faces in them, the parameters will be the following: - First face in the first + * image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: + * `faceIndex: 1`, `imageIndex: 0` - First face of the second image: + * `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: + * `faceIndex: 1`, `imageIndex: 1` * * @param matchRequest (required) * @param xRequestID Request header label. (optional) @@ -423,15 +425,17 @@ public MatchResponse match( * images, use POST `/api/match`. It's possible to compare faces in the same image * or in two different images, this is defined by the `images.type` parameter. * <br><br> Note that no more than two images of the same `type` are allowed - * for comparison.<br><br> The face detection result is displayed in the - * `detections` field. Each face is identified by two parameters: `faceIndex` - * (the index number of the face) and `imageIndex` (the index number of the image on - * which the face is detected). So, if there are two images each of which has two faces in them, - * the parameters will be the following: - First face in the first image: `faceIndex: - * 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, - * `imageIndex: 0` - First face of the second image: `faceIndex: 0`, - * `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, - * `imageIndex: 1` + * for comparison.<br><br> It's also possible to perform matching by using the + * face captured during the liveness check as one of the comparison inputs. In this case, pass + * `livenessTransactionId` instead of one of the images.<br><br> The face + * detection result is displayed in the `detections` field. Each face is identified by + * two parameters: `faceIndex` (the index number of the face) and `imageIndex` + * (the index number of the image on which the face is detected). So, if there are two images each + * of which has two faces in them, the parameters will be the following: - First face in the first + * image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: + * `faceIndex: 1`, `imageIndex: 0` - First face of the second image: + * `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: + * `faceIndex: 1`, `imageIndex: 1` * * @param matchRequest (required) * @param xRequestID Request header label. (optional) @@ -460,15 +464,17 @@ public ApiResponse matchWithHttpInfo( * two different images, use POST `/api/match`. It's possible to compare faces in * the same image or in two different images, this is defined by the `images.type` * parameter. <br><br> Note that no more than two images of the same `type` - * are allowed for comparison.<br><br> The face detection result is displayed in the - * `detections` field. Each face is identified by two parameters: `faceIndex` - * (the index number of the face) and `imageIndex` (the index number of the image on - * which the face is detected). So, if there are two images each of which has two faces in them, - * the parameters will be the following: - First face in the first image: `faceIndex: - * 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, - * `imageIndex: 0` - First face of the second image: `faceIndex: 0`, - * `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, - * `imageIndex: 1` + * are allowed for comparison.<br><br> It's also possible to perform matching by + * using the face captured during the liveness check as one of the comparison inputs. In this + * case, pass `livenessTransactionId` instead of one of the images.<br><br> + * The face detection result is displayed in the `detections` field. Each face is + * identified by two parameters: `faceIndex` (the index number of the face) and + * `imageIndex` (the index number of the image on which the face is detected). So, if + * there are two images each of which has two faces in them, the parameters will be the following: + * - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second + * face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of + * the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the + * second image: `faceIndex: 1`, `imageIndex: 1` * * @param matchRequest (required) * @param xRequestID Request header label. (optional) diff --git a/client/src/main/generated/com/regula/facesdk/webclient/gen/model/LivenessType.java b/client/src/main/generated/com/regula/facesdk/webclient/gen/model/LivenessType.java index 7f834b6..6187cd8 100644 --- a/client/src/main/generated/com/regula/facesdk/webclient/gen/model/LivenessType.java +++ b/client/src/main/generated/com/regula/facesdk/webclient/gen/model/LivenessType.java @@ -20,15 +20,17 @@ import java.io.IOException; /** - * Liveness detection can be performed in two modes: active `0` and passive `1`. - * [Learn + * Liveness detection can be performed in three modes: active `0`, passive `1`, + * and passive with blink `2`. [Learn * more](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/liveness/#active-and-passive-modes) */ @JsonAdapter(LivenessType.Adapter.class) public enum LivenessType { ACTIVE(0), - PASSIVE(1); + PASSIVE(1), + + PASSIVE_WITH_BLINK(2); private Integer value; diff --git a/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchAndSearchRequestImagesItem.java b/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchAndSearchRequestImagesItem.java index 118c774..3b9a713 100644 --- a/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchAndSearchRequestImagesItem.java +++ b/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchAndSearchRequestImagesItem.java @@ -50,6 +50,12 @@ public class MatchAndSearchRequestImagesItem { @javax.annotation.Nullable private ImageSource type; + public static final String SERIALIZED_NAME_LIVENESS_TRANSACTION_ID = "livenessTransactionId"; + + @SerializedName(SERIALIZED_NAME_LIVENESS_TRANSACTION_ID) + @javax.annotation.Nullable + private String livenessTransactionId; + public MatchAndSearchRequestImagesItem() {} public MatchAndSearchRequestImagesItem content(@javax.annotation.Nullable byte[] content) { @@ -109,6 +115,28 @@ public void setType(@javax.annotation.Nullable ImageSource type) { this.type = type; } + public MatchAndSearchRequestImagesItem livenessTransactionId( + @javax.annotation.Nullable String livenessTransactionId) { + this.livenessTransactionId = livenessTransactionId; + return this; + } + + /** + * Identifier of the completed liveness transaction whose captured face is used as one of the + * comparison inputs. If this parameter is provided, it replaces one of the images in the matching + * request. + * + * @return livenessTransactionId + */ + @javax.annotation.Nullable + public String getLivenessTransactionId() { + return livenessTransactionId; + } + + public void setLivenessTransactionId(@javax.annotation.Nullable String livenessTransactionId) { + this.livenessTransactionId = livenessTransactionId; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -121,12 +149,14 @@ public boolean equals(Object o) { (MatchAndSearchRequestImagesItem) o; return Arrays.equals(this.content, matchAndSearchRequestImagesItem.content) && Objects.equals(this.imageUrl, matchAndSearchRequestImagesItem.imageUrl) - && Objects.equals(this.type, matchAndSearchRequestImagesItem.type); + && Objects.equals(this.type, matchAndSearchRequestImagesItem.type) + && Objects.equals( + this.livenessTransactionId, matchAndSearchRequestImagesItem.livenessTransactionId); } @Override public int hashCode() { - return Objects.hash(Arrays.hashCode(content), imageUrl, type); + return Objects.hash(Arrays.hashCode(content), imageUrl, type, livenessTransactionId); } @Override @@ -136,6 +166,9 @@ public String toString() { sb.append(" content: ").append(toIndentedString(content)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" livenessTransactionId: ") + .append(toIndentedString(livenessTransactionId)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -155,7 +188,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("content", "imageUrl", "type")); + openapiFields = + new HashSet(Arrays.asList("content", "imageUrl", "type", "livenessTransactionId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -191,6 +225,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { ImageSource.validateJsonElement(jsonObj.get("type")); } + if ((jsonObj.get("livenessTransactionId") != null + && !jsonObj.get("livenessTransactionId").isJsonNull()) + && !jsonObj.get("livenessTransactionId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `livenessTransactionId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("livenessTransactionId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchImage.java b/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchImage.java index 18fa8f9..57597e6 100644 --- a/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchImage.java +++ b/client/src/main/generated/com/regula/facesdk/webclient/gen/model/MatchImage.java @@ -56,6 +56,12 @@ public class MatchImage { @javax.annotation.Nullable private Boolean detectAll = false; + public static final String SERIALIZED_NAME_LIVENESS_TRANSACTION_ID = "livenessTransactionId"; + + @SerializedName(SERIALIZED_NAME_LIVENESS_TRANSACTION_ID) + @javax.annotation.Nullable + private String livenessTransactionId; + public MatchImage() {} public MatchImage index(@javax.annotation.Nullable Integer index) { @@ -136,6 +142,27 @@ public void setDetectAll(@javax.annotation.Nullable Boolean detectAll) { this.detectAll = detectAll; } + public MatchImage livenessTransactionId(@javax.annotation.Nullable String livenessTransactionId) { + this.livenessTransactionId = livenessTransactionId; + return this; + } + + /** + * Identifier of the completed liveness transaction whose captured face is used as one of the + * comparison inputs. If this parameter is provided, it replaces one of the images in the matching + * request. + * + * @return livenessTransactionId + */ + @javax.annotation.Nullable + public String getLivenessTransactionId() { + return livenessTransactionId; + } + + public void setLivenessTransactionId(@javax.annotation.Nullable String livenessTransactionId) { + this.livenessTransactionId = livenessTransactionId; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -148,12 +175,13 @@ public boolean equals(Object o) { return Objects.equals(this.index, matchImage.index) && Objects.equals(this.type, matchImage.type) && Arrays.equals(this.data, matchImage.data) - && Objects.equals(this.detectAll, matchImage.detectAll); + && Objects.equals(this.detectAll, matchImage.detectAll) + && Objects.equals(this.livenessTransactionId, matchImage.livenessTransactionId); } @Override public int hashCode() { - return Objects.hash(index, type, Arrays.hashCode(data), detectAll); + return Objects.hash(index, type, Arrays.hashCode(data), detectAll, livenessTransactionId); } @Override @@ -164,6 +192,9 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" detectAll: ").append(toIndentedString(detectAll)).append("\n"); + sb.append(" livenessTransactionId: ") + .append(toIndentedString(livenessTransactionId)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -183,7 +214,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("index", "type", "data", "detectAll")); + openapiFields = + new HashSet( + Arrays.asList("index", "type", "data", "detectAll", "livenessTransactionId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("data")); @@ -220,6 +253,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { ImageSource.validateJsonElement(jsonObj.get("type")); } + if ((jsonObj.get("livenessTransactionId") != null + && !jsonObj.get("livenessTransactionId").isJsonNull()) + && !jsonObj.get("livenessTransactionId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `livenessTransactionId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("livenessTransactionId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory {