/** * <p> * Details about each unrecognized face in the image. * </p> * * @param unrecognizedFaces * Details about each unrecognized face in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withUnrecognizedFaces(java.util.Collection<ComparedFace> unrecognizedFaces) { setUnrecognizedFaces(unrecognizedFaces); return this; }
/** * <p> * Details about each unrecognized face in the image. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setUnrecognizedFaces(java.util.Collection)} or {@link #withUnrecognizedFaces(java.util.Collection)} if * you want to override the existing values. * </p> * * @param unrecognizedFaces * Details about each unrecognized face in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withUnrecognizedFaces(ComparedFace... unrecognizedFaces) { if (this.unrecognizedFaces == null) { setUnrecognizedFaces(new java.util.ArrayList<ComparedFace>(unrecognizedFaces.length)); } for (ComparedFace ele : unrecognizedFaces) { this.unrecognizedFaces.add(ele); } return this; }
recognizeCelebritiesResult.setUnrecognizedFaces(new ListUnmarshaller<ComparedFace>(ComparedFaceJsonUnmarshaller.getInstance()) .unmarshall(context));
/** * <p> * Details about each unrecognized face in the image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param unrecognizedFaces <p> * Details about each unrecognized face in the image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public RecognizeCelebritiesResult withUnrecognizedFaces( java.util.Collection<ComparedFace> unrecognizedFaces) { setUnrecognizedFaces(unrecognizedFaces); return this; }
public RecognizeCelebritiesResult unmarshall(JsonUnmarshallerContext context) throws Exception { RecognizeCelebritiesResult recognizeCelebritiesResult = new RecognizeCelebritiesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("CelebrityFaces")) { recognizeCelebritiesResult.setCelebrityFaces(new ListUnmarshaller<Celebrity>( CelebrityJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("UnrecognizedFaces")) { recognizeCelebritiesResult.setUnrecognizedFaces(new ListUnmarshaller<ComparedFace>( ComparedFaceJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("OrientationCorrection")) { recognizeCelebritiesResult.setOrientationCorrection(StringJsonUnmarshaller .getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return recognizeCelebritiesResult; }