/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.rekognition.model; import java.io.Serializable; import javax.annotation.Generated; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class GetFaceLivenessSessionResultsResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The sessionId for which this request was called. *

*/ private String sessionId; /** *

* Represents a status corresponding to the state of the session. Possible statuses are: CREATED, IN_PROGRESS, * SUCCEEDED, FAILED, EXPIRED. *

*/ private String status; /** *

* Probabalistic confidence score for if the person in the given video was live, represented as a float value * between 0 to 100. *

*/ private Float confidence; /** *

* A high-quality image from the Face Liveness video that can be used for face comparison or search. It includes a * bounding box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the output * configuration. In case the reference image is not returned, it's recommended to retry the Liveness check. *

*/ private AuditImage referenceImage; /** *

* A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding box of * the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession request included an * OutputConfig argument, the image will be uploaded to an S3Object specified in the output configuration. *

*/ private java.util.List auditImages; /** *

* The sessionId for which this request was called. *

* * @param sessionId * The sessionId for which this request was called. */ public void setSessionId(String sessionId) { this.sessionId = sessionId; } /** *

* The sessionId for which this request was called. *

* * @return The sessionId for which this request was called. */ public String getSessionId() { return this.sessionId; } /** *

* The sessionId for which this request was called. *

* * @param sessionId * The sessionId for which this request was called. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFaceLivenessSessionResultsResult withSessionId(String sessionId) { setSessionId(sessionId); return this; } /** *

* Represents a status corresponding to the state of the session. Possible statuses are: CREATED, IN_PROGRESS, * SUCCEEDED, FAILED, EXPIRED. *

* * @param status * Represents a status corresponding to the state of the session. Possible statuses are: CREATED, * IN_PROGRESS, SUCCEEDED, FAILED, EXPIRED. * @see LivenessSessionStatus */ public void setStatus(String status) { this.status = status; } /** *

* Represents a status corresponding to the state of the session. Possible statuses are: CREATED, IN_PROGRESS, * SUCCEEDED, FAILED, EXPIRED. *

* * @return Represents a status corresponding to the state of the session. Possible statuses are: CREATED, * IN_PROGRESS, SUCCEEDED, FAILED, EXPIRED. * @see LivenessSessionStatus */ public String getStatus() { return this.status; } /** *

* Represents a status corresponding to the state of the session. Possible statuses are: CREATED, IN_PROGRESS, * SUCCEEDED, FAILED, EXPIRED. *

* * @param status * Represents a status corresponding to the state of the session. Possible statuses are: CREATED, * IN_PROGRESS, SUCCEEDED, FAILED, EXPIRED. * @return Returns a reference to this object so that method calls can be chained together. * @see LivenessSessionStatus */ public GetFaceLivenessSessionResultsResult withStatus(String status) { setStatus(status); return this; } /** *

* Represents a status corresponding to the state of the session. Possible statuses are: CREATED, IN_PROGRESS, * SUCCEEDED, FAILED, EXPIRED. *

* * @param status * Represents a status corresponding to the state of the session. Possible statuses are: CREATED, * IN_PROGRESS, SUCCEEDED, FAILED, EXPIRED. * @return Returns a reference to this object so that method calls can be chained together. * @see LivenessSessionStatus */ public GetFaceLivenessSessionResultsResult withStatus(LivenessSessionStatus status) { this.status = status.toString(); return this; } /** *

* Probabalistic confidence score for if the person in the given video was live, represented as a float value * between 0 to 100. *

* * @param confidence * Probabalistic confidence score for if the person in the given video was live, represented as a float value * between 0 to 100. */ public void setConfidence(Float confidence) { this.confidence = confidence; } /** *

* Probabalistic confidence score for if the person in the given video was live, represented as a float value * between 0 to 100. *

* * @return Probabalistic confidence score for if the person in the given video was live, represented as a float * value between 0 to 100. */ public Float getConfidence() { return this.confidence; } /** *

* Probabalistic confidence score for if the person in the given video was live, represented as a float value * between 0 to 100. *

* * @param confidence * Probabalistic confidence score for if the person in the given video was live, represented as a float value * between 0 to 100. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFaceLivenessSessionResultsResult withConfidence(Float confidence) { setConfidence(confidence); return this; } /** *

* A high-quality image from the Face Liveness video that can be used for face comparison or search. It includes a * bounding box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the output * configuration. In case the reference image is not returned, it's recommended to retry the Liveness check. *

* * @param referenceImage * A high-quality image from the Face Liveness video that can be used for face comparison or search. It * includes a bounding box of the face and the Base64-encoded bytes that return an image. If the * CreateFaceLivenessSession request included an OutputConfig argument, the image will be uploaded to an * S3Object specified in the output configuration. In case the reference image is not returned, it's * recommended to retry the Liveness check. */ public void setReferenceImage(AuditImage referenceImage) { this.referenceImage = referenceImage; } /** *

* A high-quality image from the Face Liveness video that can be used for face comparison or search. It includes a * bounding box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the output * configuration. In case the reference image is not returned, it's recommended to retry the Liveness check. *

* * @return A high-quality image from the Face Liveness video that can be used for face comparison or search. It * includes a bounding box of the face and the Base64-encoded bytes that return an image. If the * CreateFaceLivenessSession request included an OutputConfig argument, the image will be uploaded to an * S3Object specified in the output configuration. In case the reference image is not returned, it's * recommended to retry the Liveness check. */ public AuditImage getReferenceImage() { return this.referenceImage; } /** *

* A high-quality image from the Face Liveness video that can be used for face comparison or search. It includes a * bounding box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the output * configuration. In case the reference image is not returned, it's recommended to retry the Liveness check. *

* * @param referenceImage * A high-quality image from the Face Liveness video that can be used for face comparison or search. It * includes a bounding box of the face and the Base64-encoded bytes that return an image. If the * CreateFaceLivenessSession request included an OutputConfig argument, the image will be uploaded to an * S3Object specified in the output configuration. In case the reference image is not returned, it's * recommended to retry the Liveness check. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFaceLivenessSessionResultsResult withReferenceImage(AuditImage referenceImage) { setReferenceImage(referenceImage); return this; } /** *

* A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding box of * the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession request included an * OutputConfig argument, the image will be uploaded to an S3Object specified in the output configuration. *

* * @return A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding * box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the * output configuration. */ public java.util.List getAuditImages() { return auditImages; } /** *

* A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding box of * the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession request included an * OutputConfig argument, the image will be uploaded to an S3Object specified in the output configuration. *

* * @param auditImages * A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding * box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the * output configuration. */ public void setAuditImages(java.util.Collection auditImages) { if (auditImages == null) { this.auditImages = null; return; } this.auditImages = new java.util.ArrayList(auditImages); } /** *

* A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding box of * the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession request included an * OutputConfig argument, the image will be uploaded to an S3Object specified in the output configuration. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAuditImages(java.util.Collection)} or {@link #withAuditImages(java.util.Collection)} if you want to * override the existing values. *

* * @param auditImages * A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding * box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the * output configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFaceLivenessSessionResultsResult withAuditImages(AuditImage... auditImages) { if (this.auditImages == null) { setAuditImages(new java.util.ArrayList(auditImages.length)); } for (AuditImage ele : auditImages) { this.auditImages.add(ele); } return this; } /** *

* A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding box of * the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession request included an * OutputConfig argument, the image will be uploaded to an S3Object specified in the output configuration. *

* * @param auditImages * A set of images from the Face Liveness video that can be used for audit purposes. It includes a bounding * box of the face and the Base64-encoded bytes that return an image. If the CreateFaceLivenessSession * request included an OutputConfig argument, the image will be uploaded to an S3Object specified in the * output configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFaceLivenessSessionResultsResult withAuditImages(java.util.Collection auditImages) { setAuditImages(auditImages); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSessionId() != null) sb.append("SessionId: ").append(getSessionId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getReferenceImage() != null) sb.append("ReferenceImage: ").append(getReferenceImage()).append(","); if (getAuditImages() != null) sb.append("AuditImages: ").append(getAuditImages()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetFaceLivenessSessionResultsResult == false) return false; GetFaceLivenessSessionResultsResult other = (GetFaceLivenessSessionResultsResult) obj; if (other.getSessionId() == null ^ this.getSessionId() == null) return false; if (other.getSessionId() != null && other.getSessionId().equals(this.getSessionId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null) return false; if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == false) return false; if (other.getReferenceImage() == null ^ this.getReferenceImage() == null) return false; if (other.getReferenceImage() != null && other.getReferenceImage().equals(this.getReferenceImage()) == false) return false; if (other.getAuditImages() == null ^ this.getAuditImages() == null) return false; if (other.getAuditImages() != null && other.getAuditImages().equals(this.getAuditImages()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSessionId() == null) ? 0 : getSessionId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getReferenceImage() == null) ? 0 : getReferenceImage().hashCode()); hashCode = prime * hashCode + ((getAuditImages() == null) ? 0 : getAuditImages().hashCode()); return hashCode; } @Override public GetFaceLivenessSessionResultsResult clone() { try { return (GetFaceLivenessSessionResultsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }