/** * <p> * Details about a person whose path was tracked in a video. * </p> * * @param person * Details about a person whose path was tracked in a video. * @return Returns a reference to this object so that method calls can be chained together. */ public PersonDetection withPerson(PersonDetail person) { setPerson(person); return this; }
personDetection.setPerson(PersonDetailJsonUnmarshaller.getInstance().unmarshall(context));
public PersonDetection unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } PersonDetection personDetection = new PersonDetection(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Timestamp")) { personDetection.setTimestamp(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Person")) { personDetection.setPerson(PersonDetailJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return personDetection; }