/** * <p> * Details of each face found in the image. * </p> * * @param faceDetails * Details of each face found in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public DetectFacesResult withFaceDetails(java.util.Collection<FaceDetail> faceDetails) { setFaceDetails(faceDetails); return this; }
/** * <p> * Details of each face found in the image. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setFaceDetails(java.util.Collection)} or {@link #withFaceDetails(java.util.Collection)} if you want to * override the existing values. * </p> * * @param faceDetails * Details of each face found in the image. * @return Returns a reference to this object so that method calls can be chained together. */ public DetectFacesResult withFaceDetails(FaceDetail... faceDetails) { if (this.faceDetails == null) { setFaceDetails(new java.util.ArrayList<FaceDetail>(faceDetails.length)); } for (FaceDetail ele : faceDetails) { this.faceDetails.add(ele); } return this; }
if (context.testExpression("FaceDetails", targetDepth)) { context.nextToken(); detectFacesResult.setFaceDetails(new ListUnmarshaller<FaceDetail>(FaceDetailJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * Details of each face found in the image. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param faceDetails <p> * Details of each face found in the image. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public DetectFacesResult withFaceDetails(java.util.Collection<FaceDetail> faceDetails) { setFaceDetails(faceDetails); return this; }
public DetectFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DetectFacesResult detectFacesResult = new DetectFacesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("FaceDetails")) { detectFacesResult.setFaceDetails(new ListUnmarshaller<FaceDetail>( FaceDetailJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("OrientationCorrection")) { detectFacesResult.setOrientationCorrection(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return detectFacesResult; }