/** * <p> * Describes the face properties such as the bounding box, face ID, image ID of the source image, and external image * ID that you assigned. * </p> * * @param face * Describes the face properties such as the bounding box, face ID, image ID of the source image, and * external image ID that you assigned. * @return Returns a reference to this object so that method calls can be chained together. */ public FaceMatch withFace(Face face) { setFace(face); return this; }
faceMatch.setFace(FaceJsonUnmarshaller.getInstance().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; }