/** * <p> * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities in an * image. * </p> * * @param celebrityFaces * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities * in an image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withCelebrityFaces(java.util.Collection<Celebrity> celebrityFaces) { setCelebrityFaces(celebrityFaces); return this; }
/** * <p> * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities in an * image. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setCelebrityFaces(java.util.Collection)} or {@link #withCelebrityFaces(java.util.Collection)} if you want * to override the existing values. * </p> * * @param celebrityFaces * Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 15 celebrities * in an image. * @return Returns a reference to this object so that method calls can be chained together. */ public RecognizeCelebritiesResult withCelebrityFaces(Celebrity... celebrityFaces) { if (this.celebrityFaces == null) { setCelebrityFaces(new java.util.ArrayList<Celebrity>(celebrityFaces.length)); } for (Celebrity ele : celebrityFaces) { this.celebrityFaces.add(ele); } return this; }
if (context.testExpression("CelebrityFaces", targetDepth)) { context.nextToken(); recognizeCelebritiesResult.setCelebrityFaces(new ListUnmarshaller<Celebrity>(CelebrityJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * Details about each celebrity found in the image. Amazon Rekognition can * detect a maximum of 15 celebrities in an image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param celebrityFaces <p> * Details about each celebrity found in the image. Amazon * Rekognition can detect a maximum of 15 celebrities in an * image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public RecognizeCelebritiesResult withCelebrityFaces( java.util.Collection<Celebrity> celebrityFaces) { setCelebrityFaces(celebrityFaces); 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; }