Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -460,15 +464,17 @@ public ApiResponse<MatchResponse> matchWithHttpInfo(
* two different images, use POST &#x60;/api/match&#x60;. It&#39;s possible to compare faces in
* the same image or in two different images, this is defined by the &#x60;images.type&#x60;
* parameter. &lt;br&gt;&lt;br&gt; Note that no more than two images of the same &#x60;type&#x60;
* are allowed for comparison.&lt;br&gt;&lt;br&gt; The face detection result is displayed in the
* &#x60;detections&#x60; field. Each face is identified by two parameters: &#x60;faceIndex&#x60;
* (the index number of the face) and &#x60;imageIndex&#x60; (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: &#x60;faceIndex:
* 0&#x60;, &#x60;imageIndex: 0&#x60; - Second face in the first image: &#x60;faceIndex: 1&#x60;,
* &#x60;imageIndex: 0&#x60; - First face of the second image: &#x60;faceIndex: 0&#x60;,
* &#x60;imageIndex: 1&#x60; - Second face in the second image: &#x60;faceIndex: 1&#x60;,
* &#x60;imageIndex: 1&#x60;
* are allowed for comparison.&lt;br&gt;&lt;br&gt; It&#39;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 &#x60;livenessTransactionId&#x60; instead of one of the images.&lt;br&gt;&lt;br&gt;
* The face detection result is displayed in the &#x60;detections&#x60; field. Each face is
* identified by two parameters: &#x60;faceIndex&#x60; (the index number of the face) and
* &#x60;imageIndex&#x60; (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: &#x60;faceIndex: 0&#x60;, &#x60;imageIndex: 0&#x60; - Second
* face in the first image: &#x60;faceIndex: 1&#x60;, &#x60;imageIndex: 0&#x60; - First face of
* the second image: &#x60;faceIndex: 0&#x60;, &#x60;imageIndex: 1&#x60; - Second face in the
* second image: &#x60;faceIndex: 1&#x60;, &#x60;imageIndex: 1&#x60;
*
* @param matchRequest (required)
* @param xRequestID Request header label. (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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
Expand All @@ -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();
}
Expand All @@ -155,7 +188,8 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("content", "imageUrl", "type"));
openapiFields =
new HashSet<String>(Arrays.asList("content", "imageUrl", "type", "livenessTransactionId"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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
Expand All @@ -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();
}
Expand All @@ -183,7 +214,9 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("index", "type", "data", "detectAll"));
openapiFields =
new HashSet<String>(
Arrays.asList("index", "type", "data", "detectAll", "livenessTransactionId"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(Arrays.asList("data"));
Expand Down Expand Up @@ -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 {
Expand Down
Loading