@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSearchedFaceBoundingBox() == null) ? 0 : getSearchedFaceBoundingBox().hashCode()); hashCode = prime * hashCode + ((getSearchedFaceConfidence() == null) ? 0 : getSearchedFaceConfidence().hashCode()); hashCode = prime * hashCode + ((getFaceMatches() == null) ? 0 : getFaceMatches().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersion() == null) ? 0 : getFaceModelVersion().hashCode()); return hashCode; }
/** * <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> * Version number of the face detection model associated with the input collection (<code>CollectionId</code>). * </p> * * @param faceModelVersion * Version number of the face detection model associated with the input collection (<code>CollectionId</code> * ). * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageResult withFaceModelVersion(String faceModelVersion) { setFaceModelVersion(faceModelVersion); return this; }
public SearchFacesByImageResult unmarshall(JsonUnmarshallerContext context) throws Exception { SearchFacesByImageResult searchFacesByImageResult = new SearchFacesByImageResult(); if (context.testExpression("SearchedFaceBoundingBox", targetDepth)) { context.nextToken(); searchFacesByImageResult.setSearchedFaceBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context)); searchFacesByImageResult.setSearchedFaceConfidence(context.getUnmarshaller(Float.class).unmarshall(context)); searchFacesByImageResult.setFaceMatches(new ListUnmarshaller<FaceMatch>(FaceMatchJsonUnmarshaller.getInstance()).unmarshall(context)); searchFacesByImageResult.setFaceModelVersion(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * The level of confidence that the <code>searchedFaceBoundingBox</code>, contains a face. * </p> * * @param searchedFaceConfidence * The level of confidence that the <code>searchedFaceBoundingBox</code>, contains a face. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageResult withSearchedFaceConfidence(Float searchedFaceConfidence) { setSearchedFaceConfidence(searchedFaceConfidence); return this; }
/** * <p> * The bounding box around the face in the input image that Amazon Rekognition used for the search. * </p> * * @param searchedFaceBoundingBox * The bounding box around the face in the input image that Amazon Rekognition used for the search. * @return Returns a reference to this object so that method calls can be chained together. */ public SearchFacesByImageResult withSearchedFaceBoundingBox(BoundingBox searchedFaceBoundingBox) { setSearchedFaceBoundingBox(searchedFaceBoundingBox); return this; }
/** * <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(FaceMatch... faceMatches) { if (getFaceMatches() == null) { this.faceMatches = new java.util.ArrayList<FaceMatch>(faceMatches.length); } for (FaceMatch value : faceMatches) { this.faceMatches.add(value); } 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; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SearchFacesByImageResult == false) return false; SearchFacesByImageResult other = (SearchFacesByImageResult) obj; if (other.getSearchedFaceBoundingBox() == null ^ this.getSearchedFaceBoundingBox() == null) return false; if (other.getSearchedFaceBoundingBox() != null && other.getSearchedFaceBoundingBox().equals(this.getSearchedFaceBoundingBox()) == false) return false; if (other.getSearchedFaceConfidence() == null ^ this.getSearchedFaceConfidence() == null) return false; if (other.getSearchedFaceConfidence() != null && other.getSearchedFaceConfidence().equals(this.getSearchedFaceConfidence()) == false) return false; if (other.getFaceMatches() == null ^ this.getFaceMatches() == null) return false; if (other.getFaceMatches() != null && other.getFaceMatches().equals(this.getFaceMatches()) == false) return false; if (other.getFaceModelVersion() == null ^ this.getFaceModelVersion() == null) return false; if (other.getFaceModelVersion() != null && other.getFaceModelVersion().equals(this.getFaceModelVersion()) == false) return false; return true; }
/** * <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; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSearchedFaceBoundingBox() != null) sb.append("SearchedFaceBoundingBox: ").append(getSearchedFaceBoundingBox()).append(","); if (getSearchedFaceConfidence() != null) sb.append("SearchedFaceConfidence: ").append(getSearchedFaceConfidence()).append(","); if (getFaceMatches() != null) sb.append("FaceMatches: ").append(getFaceMatches()).append(","); if (getFaceModelVersion() != null) sb.append("FaceModelVersion: ").append(getFaceModelVersion()); sb.append("}"); return sb.toString(); }
/** * <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; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSearchedFaceBoundingBox() == null) ? 0 : getSearchedFaceBoundingBox() .hashCode()); hashCode = prime * hashCode + ((getSearchedFaceConfidence() == null) ? 0 : getSearchedFaceConfidence() .hashCode()); hashCode = prime * hashCode + ((getFaceMatches() == null) ? 0 : getFaceMatches().hashCode()); hashCode = prime * hashCode + ((getFaceModelVersion() == null) ? 0 : getFaceModelVersion().hashCode()); return hashCode; }
SearchFacesByImageResult other = (SearchFacesByImageResult) obj; if (other.getSearchedFaceBoundingBox() == null ^ this.getSearchedFaceBoundingBox() == null) return false; if (other.getSearchedFaceBoundingBox() != null && other.getSearchedFaceBoundingBox().equals(this.getSearchedFaceBoundingBox()) == false) return false; if (other.getSearchedFaceConfidence() == null ^ this.getSearchedFaceConfidence() == null) return false; if (other.getSearchedFaceConfidence() != null && other.getSearchedFaceConfidence().equals(this.getSearchedFaceConfidence()) == false) return false; if (other.getFaceMatches() == null ^ this.getFaceMatches() == null) return false; if (other.getFaceMatches() != null && other.getFaceMatches().equals(this.getFaceMatches()) == false) return false; if (other.getFaceModelVersion() == null ^ this.getFaceModelVersion() == null) return false; if (other.getFaceModelVersion() != null && other.getFaceModelVersion().equals(this.getFaceModelVersion()) == false) return false; return true;
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSearchedFaceBoundingBox() != null) sb.append("SearchedFaceBoundingBox: " + getSearchedFaceBoundingBox() + ","); if (getSearchedFaceConfidence() != null) sb.append("SearchedFaceConfidence: " + getSearchedFaceConfidence() + ","); if (getFaceMatches() != null) sb.append("FaceMatches: " + getFaceMatches() + ","); if (getFaceModelVersion() != null) sb.append("FaceModelVersion: " + getFaceModelVersion()); sb.append("}"); return sb.toString(); }