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