/** * <p> * Provides face metadata (bounding box and confidence that the bounding box actually contains a face). * </p> * * @param face * Provides face metadata (bounding box and confidence that the bounding box actually contains a face). * @return Returns a reference to this object so that method calls can be chained together. */ public CompareFacesMatch withFace(ComparedFace face) { setFace(face); return this; }
compareFacesMatch.setFace(ComparedFaceJsonUnmarshaller.getInstance().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; }