/** * <p> * Identifier for the person detected person within a video. Use to keep track of the person throughout the video. * The identifier is not stored by Amazon Rekognition. * </p> * * @param index * Identifier for the person detected person within a video. Use to keep track of the person throughout the * video. The identifier is not stored by Amazon Rekognition. * @return Returns a reference to this object so that method calls can be chained together. */ public PersonDetail withIndex(Long index) { setIndex(index); return this; }
if (context.testExpression("Index", targetDepth)) { context.nextToken(); personDetail.setIndex(context.getUnmarshaller(Long.class).unmarshall(context));
public PersonDetail unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } PersonDetail personDetail = new PersonDetail(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Index")) { personDetail.setIndex(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("BoundingBox")) { personDetail.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Face")) { personDetail.setFace(FaceDetailJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return personDetail; }