/* * Copyright 2010-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; public class GetFaceLivenessSessionResultsResult implements Serializable { /** *

* The sessionId for which this request was called. *

*

* Constraints:
* Length: 36 - 36
* Pattern: * [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
*/ private String sessionId; /** *

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

*

* Constraints:
* Allowed Values: 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. *

*

* Constraints:
* Length: 0.0 - 100.0
*/ 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. *

*

* Constraints:
* Length: 36 - 36
* Pattern: * [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
* * @return

* The sessionId for which this request was called. *

*/ public String getSessionId() { return sessionId; } /** *

* The sessionId for which this request was called. *

*

* Constraints:
* Length: 36 - 36
* Pattern: * [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 36 - 36
* Pattern: * [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
* * @param sessionId

* The sessionId for which this request was called. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetFaceLivenessSessionResultsResult withSessionId(String sessionId) { this.sessionId = sessionId; return this; } /** *

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

*

* Constraints:
* Allowed Values: 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 status; } /** *

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

*

* Constraints:
* Allowed Values: 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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: 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 A reference to this updated object so that method calls can be * chained together. * @see LivenessSessionStatus */ public GetFaceLivenessSessionResultsResult withStatus(String status) { this.status = status; return this; } /** *

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

*

* Constraints:
* Allowed Values: 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(LivenessSessionStatus status) { this.status = status.toString(); } /** *

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

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: 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 A reference to this updated 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. *

*

* Constraints:
* Length: 0.0 - 100.0
* * @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 confidence; } /** *

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

*

* Constraints:
* Length: 0.0 - 100.0
* * @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. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 0.0 - 100.0
* * @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 A reference to this updated object so that method calls can be * chained together. */ public GetFaceLivenessSessionResultsResult withConfidence(Float confidence) { this.confidence = 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. *

* * @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 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. *

*/ 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated object so that method calls can be * chained together. */ public GetFaceLivenessSessionResultsResult withReferenceImage(AuditImage referenceImage) { this.referenceImage = 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated object so that method calls can be * chained together. */ public GetFaceLivenessSessionResultsResult withAuditImages(AuditImage... auditImages) { if (getAuditImages() == null) { this.auditImages = new java.util.ArrayList(auditImages.length); } for (AuditImage value : auditImages) { this.auditImages.add(value); } 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated 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; useful for testing and * debugging. * * @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: " + getSessionId() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getConfidence() != null) sb.append("Confidence: " + getConfidence() + ","); if (getReferenceImage() != null) sb.append("ReferenceImage: " + getReferenceImage() + ","); if (getAuditImages() != null) sb.append("AuditImages: " + getAuditImages()); sb.append("}"); return sb.toString(); } @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 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; } }