/** * <p> * Confidence in the match of this face with the input face. * </p> * * @param similarity * Confidence in the match of this face with the input face. * @return Returns a reference to this object so that method calls can be chained together. */ public FaceMatch withSimilarity(Float similarity) { setSimilarity(similarity); return this; }
if (context.testExpression("Similarity", targetDepth)) { context.nextToken(); faceMatch.setSimilarity(context.getUnmarshaller(Float.class).unmarshall(context));
public FaceMatch unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } FaceMatch faceMatch = new FaceMatch(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Similarity")) { faceMatch.setSimilarity(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Face")) { faceMatch.setFace(FaceJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return faceMatch; }