@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getAgeRange() == null) ? 0 : getAgeRange().hashCode()); hashCode = prime * hashCode + ((getSmile() == null) ? 0 : getSmile().hashCode()); hashCode = prime * hashCode + ((getEyeglasses() == null) ? 0 : getEyeglasses().hashCode()); hashCode = prime * hashCode + ((getSunglasses() == null) ? 0 : getSunglasses().hashCode()); hashCode = prime * hashCode + ((getGender() == null) ? 0 : getGender().hashCode()); hashCode = prime * hashCode + ((getBeard() == null) ? 0 : getBeard().hashCode()); hashCode = prime * hashCode + ((getMustache() == null) ? 0 : getMustache().hashCode()); hashCode = prime * hashCode + ((getEyesOpen() == null) ? 0 : getEyesOpen().hashCode()); hashCode = prime * hashCode + ((getMouthOpen() == null) ? 0 : getMouthOpen().hashCode()); hashCode = prime * hashCode + ((getEmotions() == null) ? 0 : getEmotions().hashCode()); hashCode = prime * hashCode + ((getLandmarks() == null) ? 0 : getLandmarks().hashCode()); hashCode = prime * hashCode + ((getPose() == null) ? 0 : getPose().hashCode()); hashCode = prime * hashCode + ((getQuality() == null) ? 0 : getQuality().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); return hashCode; }
public FaceDetail unmarshall(JsonUnmarshallerContext context) throws Exception { FaceDetail faceDetail = new FaceDetail(); if (context.testExpression("BoundingBox", targetDepth)) { context.nextToken(); faceDetail.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setAgeRange(AgeRangeJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setSmile(SmileJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setEyeglasses(EyeglassesJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setSunglasses(SunglassesJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setGender(GenderJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setBeard(BeardJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setMustache(MustacheJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setEyesOpen(EyeOpenJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setMouthOpen(MouthOpenJsonUnmarshaller.getInstance().unmarshall(context)); faceDetail.setEmotions(new ListUnmarshaller<Emotion>(EmotionJsonUnmarshaller.getInstance()).unmarshall(context)); faceDetail.setLandmarks(new ListUnmarshaller<Landmark>(LandmarkJsonUnmarshaller.getInstance()).unmarshall(context)); faceDetail.setPose(PoseJsonUnmarshaller.getInstance().unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceDetection == false) return false; FaceDetection other = (FaceDetection) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true; }
/** * <p> * The emotions detected on the face, and the confidence level in the * determination. For example, HAPPY, SAD, and ANGRY. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param emotions <p> * The emotions detected on the face, and the confidence level in * the determination. For example, HAPPY, SAD, and ANGRY. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public FaceDetail withEmotions(Emotion... emotions) { if (getEmotions() == null) { this.emotions = new java.util.ArrayList<Emotion>(emotions.length); } for (Emotion value : emotions) { this.emotions.add(value); } return this; }
FaceDetail faceDetail = new FaceDetail(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("BoundingBox")) { faceDetail.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("AgeRange")) { faceDetail.setAgeRange(AgeRangeJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Smile")) { faceDetail.setSmile(SmileJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Eyeglasses")) { faceDetail.setEyeglasses(EyeglassesJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Sunglasses")) { faceDetail.setSunglasses(SunglassesJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Gender")) { faceDetail.setGender(GenderJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Beard")) { faceDetail.setBeard(BeardJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Mustache")) { faceDetail.setMustache(MustacheJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("EyesOpen")) {
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UnindexedFace == false) return false; UnindexedFace other = (UnindexedFace) obj; if (other.getReasons() == null ^ this.getReasons() == null) return false; if (other.getReasons() != null && other.getReasons().equals(this.getReasons()) == false) return false; if (other.getFaceDetail() == null ^ this.getFaceDetail() == null) return false; if (other.getFaceDetail() != null && other.getFaceDetail().equals(this.getFaceDetail()) == false) return false; return true; }
return false; FaceDetail other = (FaceDetail) obj; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getAgeRange() == null ^ this.getAgeRange() == null) return false; if (other.getAgeRange() != null && other.getAgeRange().equals(this.getAgeRange()) == false) return false; if (other.getSmile() == null ^ this.getSmile() == null) return false; if (other.getSmile() != null && other.getSmile().equals(this.getSmile()) == false) return false; if (other.getEyeglasses() == null ^ this.getEyeglasses() == null) return false; if (other.getEyeglasses() != null && other.getEyeglasses().equals(this.getEyeglasses()) == false) return false; if (other.getSunglasses() == null ^ this.getSunglasses() == null) return false; if (other.getSunglasses() != null && other.getSunglasses().equals(this.getSunglasses()) == false) return false; if (other.getGender() == null ^ this.getGender() == null) return false; if (other.getGender() != null && other.getGender().equals(this.getGender()) == false) return false; if (other.getBeard() == null ^ this.getBeard() == null) return false; if (other.getBeard() != null && other.getBeard().equals(this.getBeard()) == false)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceRecord == false) return false; FaceRecord other = (FaceRecord) obj; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; if (other.getFaceDetail() == null ^ this.getFaceDetail() == null) return false; if (other.getFaceDetail() != null && other.getFaceDetail().equals(this.getFaceDetail()) == false) return false; return true; }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBoundingBox() != null) sb.append("BoundingBox: ").append(getBoundingBox()).append(","); if (getAgeRange() != null) sb.append("AgeRange: ").append(getAgeRange()).append(","); if (getSmile() != null) sb.append("Smile: ").append(getSmile()).append(","); if (getEyeglasses() != null) sb.append("Eyeglasses: ").append(getEyeglasses()).append(","); if (getSunglasses() != null) sb.append("Sunglasses: ").append(getSunglasses()).append(","); if (getGender() != null) sb.append("Gender: ").append(getGender()).append(","); if (getBeard() != null) sb.append("Beard: ").append(getBeard()).append(","); if (getMustache() != null) sb.append("Mustache: ").append(getMustache()).append(","); if (getEyesOpen() != null) sb.append("EyesOpen: ").append(getEyesOpen()).append(","); if (getMouthOpen() != null) sb.append("MouthOpen: ").append(getMouthOpen()).append(","); if (getEmotions() != null) sb.append("Emotions: ").append(getEmotions()).append(","); if (getLandmarks() != null) sb.append("Landmarks: ").append(getLandmarks()).append(","); if (getPose() != null) sb.append("Pose: ").append(getPose()).append(","); if (getQuality() != null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PersonDetail == false) return false; PersonDetail other = (PersonDetail) obj; if (other.getIndex() == null ^ this.getIndex() == null) return false; if (other.getIndex() != null && other.getIndex().equals(this.getIndex()) == false) return false; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(FaceDetail faceDetail, ProtocolMarshaller protocolMarshaller) { if (faceDetail == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(faceDetail.getBoundingBox(), BOUNDINGBOX_BINDING); protocolMarshaller.marshall(faceDetail.getAgeRange(), AGERANGE_BINDING); protocolMarshaller.marshall(faceDetail.getSmile(), SMILE_BINDING); protocolMarshaller.marshall(faceDetail.getEyeglasses(), EYEGLASSES_BINDING); protocolMarshaller.marshall(faceDetail.getSunglasses(), SUNGLASSES_BINDING); protocolMarshaller.marshall(faceDetail.getGender(), GENDER_BINDING); protocolMarshaller.marshall(faceDetail.getBeard(), BEARD_BINDING); protocolMarshaller.marshall(faceDetail.getMustache(), MUSTACHE_BINDING); protocolMarshaller.marshall(faceDetail.getEyesOpen(), EYESOPEN_BINDING); protocolMarshaller.marshall(faceDetail.getMouthOpen(), MOUTHOPEN_BINDING); protocolMarshaller.marshall(faceDetail.getEmotions(), EMOTIONS_BINDING); protocolMarshaller.marshall(faceDetail.getLandmarks(), LANDMARKS_BINDING); protocolMarshaller.marshall(faceDetail.getPose(), POSE_BINDING); protocolMarshaller.marshall(faceDetail.getQuality(), QUALITY_BINDING); protocolMarshaller.marshall(faceDetail.getConfidence(), CONFIDENCE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getAgeRange() == null) ? 0 : getAgeRange().hashCode()); hashCode = prime * hashCode + ((getSmile() == null) ? 0 : getSmile().hashCode()); hashCode = prime * hashCode + ((getEyeglasses() == null) ? 0 : getEyeglasses().hashCode()); hashCode = prime * hashCode + ((getSunglasses() == null) ? 0 : getSunglasses().hashCode()); hashCode = prime * hashCode + ((getGender() == null) ? 0 : getGender().hashCode()); hashCode = prime * hashCode + ((getBeard() == null) ? 0 : getBeard().hashCode()); hashCode = prime * hashCode + ((getMustache() == null) ? 0 : getMustache().hashCode()); hashCode = prime * hashCode + ((getEyesOpen() == null) ? 0 : getEyesOpen().hashCode()); hashCode = prime * hashCode + ((getMouthOpen() == null) ? 0 : getMouthOpen().hashCode()); hashCode = prime * hashCode + ((getEmotions() == null) ? 0 : getEmotions().hashCode()); hashCode = prime * hashCode + ((getLandmarks() == null) ? 0 : getLandmarks().hashCode()); hashCode = prime * hashCode + ((getPose() == null) ? 0 : getPose().hashCode()); hashCode = prime * hashCode + ((getQuality() == null) ? 0 : getQuality().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceDetection == false) return false; FaceDetection other = (FaceDetection) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true; } }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBoundingBox() != null) sb.append("BoundingBox: " + getBoundingBox() + ","); if (getAgeRange() != null) sb.append("AgeRange: " + getAgeRange() + ","); if (getSmile() != null) sb.append("Smile: " + getSmile() + ","); if (getEyeglasses() != null) sb.append("Eyeglasses: " + getEyeglasses() + ","); if (getSunglasses() != null) sb.append("Sunglasses: " + getSunglasses() + ","); if (getGender() != null) sb.append("Gender: " + getGender() + ","); if (getBeard() != null) sb.append("Beard: " + getBeard() + ","); if (getMustache() != null) sb.append("Mustache: " + getMustache() + ","); if (getEyesOpen() != null) sb.append("EyesOpen: " + getEyesOpen() + ","); if (getMouthOpen() != null) sb.append("MouthOpen: " + getMouthOpen() + ","); if (getEmotions() != null) sb.append("Emotions: " + getEmotions() + ","); if (getLandmarks() != null) sb.append("Landmarks: " + getLandmarks() + ","); if (getPose() != null) sb.append("Pose: " + getPose() + ","); if (getQuality() != null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceRecord == false) return false; FaceRecord other = (FaceRecord) obj; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; if (other.getFaceDetail() == null ^ this.getFaceDetail() == null) return false; if (other.getFaceDetail() != null && other.getFaceDetail().equals(this.getFaceDetail()) == false) return false; return true; } }
if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getAgeRange() == null ^ this.getAgeRange() == null) return false; if (other.getAgeRange() != null && other.getAgeRange().equals(this.getAgeRange()) == false) return false; if (other.getSmile() == null ^ this.getSmile() == null) return false; if (other.getSmile() != null && other.getSmile().equals(this.getSmile()) == false) return false; if (other.getEyeglasses() == null ^ this.getEyeglasses() == null) return false; if (other.getEyeglasses() != null && other.getEyeglasses().equals(this.getEyeglasses()) == false) return false; if (other.getSunglasses() == null ^ this.getSunglasses() == null) return false; if (other.getSunglasses() != null && other.getSunglasses().equals(this.getSunglasses()) == false) return false; if (other.getGender() == null ^ this.getGender() == null) return false; if (other.getGender() != null && other.getGender().equals(this.getGender()) == false) return false; if (other.getBeard() == null ^ this.getBeard() == null) return false;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PersonDetail == false) return false; PersonDetail other = (PersonDetail) obj; if (other.getIndex() == null ^ this.getIndex() == null) return false; if (other.getIndex() != null && other.getIndex().equals(this.getIndex()) == false) return false; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true; } }
public void marshall(FaceDetail faceDetail, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (faceDetail.getBoundingBox() != null) { BoundingBox boundingBox = faceDetail.getBoundingBox(); jsonWriter.name("BoundingBox"); BoundingBoxJsonMarshaller.getInstance().marshall(boundingBox, jsonWriter); if (faceDetail.getAgeRange() != null) { AgeRange ageRange = faceDetail.getAgeRange(); jsonWriter.name("AgeRange"); AgeRangeJsonMarshaller.getInstance().marshall(ageRange, jsonWriter); if (faceDetail.getSmile() != null) { Smile smile = faceDetail.getSmile(); jsonWriter.name("Smile"); SmileJsonMarshaller.getInstance().marshall(smile, jsonWriter); if (faceDetail.getEyeglasses() != null) { Eyeglasses eyeglasses = faceDetail.getEyeglasses(); jsonWriter.name("Eyeglasses"); EyeglassesJsonMarshaller.getInstance().marshall(eyeglasses, jsonWriter); if (faceDetail.getSunglasses() != null) { Sunglasses sunglasses = faceDetail.getSunglasses(); jsonWriter.name("Sunglasses"); SunglassesJsonMarshaller.getInstance().marshall(sunglasses, jsonWriter); if (faceDetail.getGender() != null) { Gender gender = faceDetail.getGender(); jsonWriter.name("Gender");
if (other.getFace() == null ^ this.getFace() == null) return false; if (other.getFace() != null && other.getFace().equals(this.getFace()) == false) return false; return true;