/** * <p> * An array of faces that matched the input face, along with the confidence in the match. * </p> * * @param faceMatches * An array of faces that matched 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 SearchFacesResult withFaceMatches(java.util.Collection<FaceMatch> faceMatches) { setFaceMatches(faceMatches); return this; }
/** * <p> * An array of faces that matched 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 matched 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 SearchFacesResult 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; }
searchFacesResult.setFaceMatches(new ListUnmarshaller<FaceMatch>(FaceMatchJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * An array of faces that matched 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 matched 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 SearchFacesResult withFaceMatches(java.util.Collection<FaceMatch> faceMatches) { setFaceMatches(faceMatches); return this; }
public SearchFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception { SearchFacesResult searchFacesResult = new SearchFacesResult(); AwsJsonReader reader = context.getReader(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("SearchedFaceId")) { searchFacesResult.setSearchedFaceId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceMatches")) { searchFacesResult.setFaceMatches(new ListUnmarshaller<FaceMatch>( FaceMatchJsonUnmarshaller.getInstance() ) .unmarshall(context)); } else if (name.equals("FaceModelVersion")) { searchFacesResult.setFaceModelVersion(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return searchFacesResult; }