/* * 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; /** *
* Input face recognition parameters for an Amazon Rekognition stream processor. * Includes the collection to use for face recognition and the face attributes * to detect. Defining the settings is required in the request parameter for * CreateStreamProcessor. *
*/ public class FaceSearchSettings implements Serializable { /** ** The ID of a collection that contains faces that you want to search for. *
*
* Constraints:
* Length: 1 - 255
* Pattern: [a-zA-Z0-9_.\-]+
*/
private String collectionId;
/**
*
* Minimum face match confidence score that must be met to return a result * for a recognized face. The default is 80. 0 is the lowest confidence. 100 * is the highest confidence. Values between 0 and 100 are accepted, and * values lower than 80 are set to 80. *
*
* Constraints:
* Length: 0.0 - 100.0
*/
private Float faceMatchThreshold;
/**
*
* The ID of a collection that contains faces that you want to search for. *
*
* Constraints:
* Length: 1 - 255
* Pattern: [a-zA-Z0-9_.\-]+
*
* @return
* The ID of a collection that contains faces that you want to * search for. *
*/ public String getCollectionId() { return collectionId; } /** ** The ID of a collection that contains faces that you want to search for. *
*
* Constraints:
* Length: 1 - 255
* Pattern: [a-zA-Z0-9_.\-]+
*
* @param collectionId
* The ID of a collection that contains faces that you want to * search for. *
*/ public void setCollectionId(String collectionId) { this.collectionId = collectionId; } /** ** The ID of a collection that contains faces that you want to search for. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 255
* Pattern: [a-zA-Z0-9_.\-]+
*
* @param collectionId
* The ID of a collection that contains faces that you want to * search for. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FaceSearchSettings withCollectionId(String collectionId) { this.collectionId = collectionId; return this; } /** ** Minimum face match confidence score that must be met to return a result * for a recognized face. The default is 80. 0 is the lowest confidence. 100 * is the highest confidence. Values between 0 and 100 are accepted, and * values lower than 80 are set to 80. *
*
* Constraints:
* Length: 0.0 - 100.0
*
* @return
* Minimum face match confidence score that must be met to return a * result for a recognized face. The default is 80. 0 is the lowest * confidence. 100 is the highest confidence. Values between 0 and * 100 are accepted, and values lower than 80 are set to 80. *
*/ public Float getFaceMatchThreshold() { return faceMatchThreshold; } /** ** Minimum face match confidence score that must be met to return a result * for a recognized face. The default is 80. 0 is the lowest confidence. 100 * is the highest confidence. Values between 0 and 100 are accepted, and * values lower than 80 are set to 80. *
*
* Constraints:
* Length: 0.0 - 100.0
*
* @param faceMatchThreshold
* Minimum face match confidence score that must be met to return * a result for a recognized face. The default is 80. 0 is the * lowest confidence. 100 is the highest confidence. Values * between 0 and 100 are accepted, and values lower than 80 are * set to 80. *
*/ public void setFaceMatchThreshold(Float faceMatchThreshold) { this.faceMatchThreshold = faceMatchThreshold; } /** ** Minimum face match confidence score that must be met to return a result * for a recognized face. The default is 80. 0 is the lowest confidence. 100 * is the highest confidence. Values between 0 and 100 are accepted, and * values lower than 80 are set to 80. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0.0 - 100.0
*
* @param faceMatchThreshold
* Minimum face match confidence score that must be met to return * a result for a recognized face. The default is 80. 0 is the * lowest confidence. 100 is the highest confidence. Values * between 0 and 100 are accepted, and values lower than 80 are * set to 80. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FaceSearchSettings withFaceMatchThreshold(Float faceMatchThreshold) { this.faceMatchThreshold = faceMatchThreshold; 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 (getCollectionId() != null) sb.append("CollectionId: " + getCollectionId() + ","); if (getFaceMatchThreshold() != null) sb.append("FaceMatchThreshold: " + getFaceMatchThreshold()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCollectionId() == null) ? 0 : getCollectionId().hashCode()); hashCode = prime * hashCode + ((getFaceMatchThreshold() == null) ? 0 : getFaceMatchThreshold().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceSearchSettings == false) return false; FaceSearchSettings other = (FaceSearchSettings) obj; if (other.getCollectionId() == null ^ this.getCollectionId() == null) return false; if (other.getCollectionId() != null && other.getCollectionId().equals(this.getCollectionId()) == false) return false; if (other.getFaceMatchThreshold() == null ^ this.getFaceMatchThreshold() == null) return false; if (other.getFaceMatchThreshold() != null && other.getFaceMatchThreshold().equals(this.getFaceMatchThreshold()) == false) return false; return true; } }