/** * <p> * Information about the faces in the input collection that match the face of a person in the video. * </p> * * @param faceMatches * Information about the faces in the input collection that match the face of a person in the video. * @return Returns a reference to this object so that method calls can be chained together. */ public PersonMatch withFaceMatches(java.util.Collection<FaceMatch> faceMatches) { setFaceMatches(faceMatches); return this; }
/** * <p> * Information about the faces in the input collection that match the face of a person in the video. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setFaceMatches(java.util.Collection)} or {@link #withFaceMatches(java.util.Collection)} if you want to * override the existing values. * </p> * * @param faceMatches * Information about the faces in the input collection that match the face of a person in the video. * @return Returns a reference to this object so that method calls can be chained together. */ public PersonMatch withFaceMatches(FaceMatch... faceMatches) { if (this.faceMatches == null) { setFaceMatches(new java.util.ArrayList<FaceMatch>(faceMatches.length)); } for (FaceMatch ele : faceMatches) { this.faceMatches.add(ele); } return this; }
personMatch.setFaceMatches(new ListUnmarshaller<FaceMatch>(FaceMatchJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * Information about the faces in the input collection that match the face * of a person in the video. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param faceMatches <p> * Information about the faces in the input collection that match * the face of a person in the video. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public PersonMatch withFaceMatches(java.util.Collection<FaceMatch> faceMatches) { setFaceMatches(faceMatches); return this; }
public PersonMatch unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } PersonMatch personMatch = new PersonMatch(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Timestamp")) { personMatch.setTimestamp(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Person")) { personMatch.setPerson(PersonDetailJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceMatches")) { personMatch.setFaceMatches(new ListUnmarshaller<FaceMatch>( FaceMatchJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return personMatch; }