@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceDetails() == null) ? 0 : getFaceDetails().hashCode()); hashCode = prime * hashCode + ((getOrientationCorrection() == null) ? 0 : getOrientationCorrection().hashCode()); return hashCode; }
/** * <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; }
setOrientationCorrection(orientationCorrection); return this;
public DetectFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception { DetectFacesResult detectFacesResult = new DetectFacesResult(); if (context.testExpression("FaceDetails", targetDepth)) { context.nextToken(); detectFacesResult.setFaceDetails(new ListUnmarshaller<FaceDetail>(FaceDetailJsonUnmarshaller.getInstance()).unmarshall(context)); detectFacesResult.setOrientationCorrection(context.getUnmarshaller(String.class).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(FaceDetail... faceDetails) { if (getFaceDetails() == null) { this.faceDetails = new java.util.ArrayList<FaceDetail>(faceDetails.length); } for (FaceDetail value : faceDetails) { this.faceDetails.add(value); } return this; }
withOrientationCorrection(orientationCorrection);
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; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectFacesResult == false) return false; DetectFacesResult other = (DetectFacesResult) obj; if (other.getFaceDetails() == null ^ this.getFaceDetails() == null) return false; if (other.getFaceDetails() != null && other.getFaceDetails().equals(this.getFaceDetails()) == false) return false; if (other.getOrientationCorrection() == null ^ this.getOrientationCorrection() == null) return false; if (other.getOrientationCorrection() != null && other.getOrientationCorrection().equals(this.getOrientationCorrection()) == false) return false; return true; }
/** * <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; }
/** * 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 (getFaceDetails() != null) sb.append("FaceDetails: ").append(getFaceDetails()).append(","); if (getOrientationCorrection() != null) sb.append("OrientationCorrection: ").append(getOrientationCorrection()); sb.append("}"); return sb.toString(); }
/** * <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; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceDetails() == null) ? 0 : getFaceDetails().hashCode()); hashCode = prime * hashCode + ((getOrientationCorrection() == null) ? 0 : getOrientationCorrection().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectFacesResult == false) return false; DetectFacesResult other = (DetectFacesResult) obj; if (other.getFaceDetails() == null ^ this.getFaceDetails() == null) return false; if (other.getFaceDetails() != null && other.getFaceDetails().equals(this.getFaceDetails()) == false) return false; if (other.getOrientationCorrection() == null ^ this.getOrientationCorrection() == null) return false; if (other.getOrientationCorrection() != null && other.getOrientationCorrection().equals(this.getOrientationCorrection()) == 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 (getFaceDetails() != null) sb.append("FaceDetails: " + getFaceDetails() + ","); if (getOrientationCorrection() != null) sb.append("OrientationCorrection: " + getOrientationCorrection()); sb.append("}"); return sb.toString(); }