/** * <p> * An array of faces detected and added to the collection. For more information, see Searching Faces in a Collection * in the Amazon Rekognition Developer Guide. * </p> * * @param faceRecords * An array of faces detected and added to the collection. For more information, see Searching Faces in a * Collection in the Amazon Rekognition Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public IndexFacesResult withFaceRecords(java.util.Collection<FaceRecord> faceRecords) { setFaceRecords(faceRecords); return this; }
/** * <p> * An array of faces detected and added to the collection. For more information, see Searching Faces in a Collection * in the Amazon Rekognition Developer Guide. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setFaceRecords(java.util.Collection)} or {@link #withFaceRecords(java.util.Collection)} if you want to * override the existing values. * </p> * * @param faceRecords * An array of faces detected and added to the collection. For more information, see Searching Faces in a * Collection in the Amazon Rekognition Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public IndexFacesResult withFaceRecords(FaceRecord... faceRecords) { if (this.faceRecords == null) { setFaceRecords(new java.util.ArrayList<FaceRecord>(faceRecords.length)); } for (FaceRecord ele : faceRecords) { this.faceRecords.add(ele); } return this; }
if (context.testExpression("FaceRecords", targetDepth)) { context.nextToken(); indexFacesResult.setFaceRecords(new ListUnmarshaller<FaceRecord>(FaceRecordJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * An array of faces detected and added to the collection. For more * information, see Searching Faces in a Collection in the Amazon * Rekognition Developer Guide. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param faceRecords <p> * An array of faces detected and added to the collection. For * more information, see Searching Faces in a Collection in the * Amazon Rekognition Developer Guide. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public IndexFacesResult withFaceRecords(java.util.Collection<FaceRecord> faceRecords) { setFaceRecords(faceRecords); return this; }
public IndexFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception { IndexFacesResult indexFacesResult = new IndexFacesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("FaceRecords")) { indexFacesResult.setFaceRecords(new ListUnmarshaller<FaceRecord>( FaceRecordJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("OrientationCorrection")) { indexFacesResult.setOrientationCorrection(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceModelVersion")) { indexFacesResult.setFaceModelVersion(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return indexFacesResult; }