/** * <p> * An array of faces that match the input face, along with the confidence in the match. * </p> * * @param faceMatches * An array of faces that match the input face, along with the confidence in the match. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageResult withFaceMatches(java.util.Collection<FaceMatch> faceMatches) { setFaceMatches(faceMatches); return this; }
/** * <p> * An array of faces that match the input face, along with the confidence in the match. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setFaceMatches(java.util.Collection)} or {@link #withFaceMatches(java.util.Collection)} if you want to * override the existing values. * </p> * * @param faceMatches * An array of faces that match the input face, along with the confidence in the match. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageResult withFaceMatches(FaceMatch... faceMatches) { if (this.faceMatches == null) { setFaceMatches(new java.util.ArrayList<FaceMatch>(faceMatches.length)); } for (FaceMatch ele : faceMatches) { this.faceMatches.add(ele); } return this; }
searchFacesByImageResult.setFaceMatches(new ListUnmarshaller<FaceMatch>(FaceMatchJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * An array of faces that match the input face, along with the confidence in * the match. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param faceMatches <p> * An array of faces that match the input face, along with the * confidence in the match. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public SearchFacesByImageResult withFaceMatches(java.util.Collection<FaceMatch> faceMatches) { setFaceMatches(faceMatches); return this; }
public SearchFacesByImageResult unmarshall(JsonUnmarshallerContext context) throws Exception { SearchFacesByImageResult searchFacesByImageResult = new SearchFacesByImageResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("SearchedFaceBoundingBox")) { searchFacesByImageResult.setSearchedFaceBoundingBox(BoundingBoxJsonUnmarshaller .getInstance() .unmarshall(context)); } else if (name.equals("SearchedFaceConfidence")) { searchFacesByImageResult.setSearchedFaceConfidence(FloatJsonUnmarshaller .getInstance() .unmarshall(context)); } else if (name.equals("FaceMatches")) { searchFacesByImageResult.setFaceMatches(new ListUnmarshaller<FaceMatch>( FaceMatchJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("FaceModelVersion")) { searchFacesByImageResult.setFaceModelVersion(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return searchFacesByImageResult; }