/** * 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 (getBoundingBox() != null) sb.append("BoundingBox: ").append(getBoundingBox()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getLandmarks() != null) sb.append("Landmarks: ").append(getLandmarks()).append(","); if (getPose() != null) sb.append("Pose: ").append(getPose()).append(","); if (getQuality() != null) sb.append("Quality: ").append(getQuality()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().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()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(ComparedFace comparedFace, ProtocolMarshaller protocolMarshaller) { if (comparedFace == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(comparedFace.getBoundingBox(), BOUNDINGBOX_BINDING); protocolMarshaller.marshall(comparedFace.getConfidence(), CONFIDENCE_BINDING); protocolMarshaller.marshall(comparedFace.getLandmarks(), LANDMARKS_BINDING); protocolMarshaller.marshall(comparedFace.getPose(), POSE_BINDING); protocolMarshaller.marshall(comparedFace.getQuality(), QUALITY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
return false; ComparedFace other = (ComparedFace) obj; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null)
/** * 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 (getBoundingBox() != null) sb.append("BoundingBox: " + getBoundingBox() + ","); if (getConfidence() != null) sb.append("Confidence: " + getConfidence() + ","); if (getLandmarks() != null) sb.append("Landmarks: " + getLandmarks() + ","); if (getPose() != null) sb.append("Pose: " + getPose() + ","); if (getQuality() != null) sb.append("Quality: " + getQuality()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().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()); return hashCode; }
ComparedFace other = (ComparedFace) obj; if (other.getBoundingBox() == null ^ this.getBoundingBox() == null) return false; if (other.getBoundingBox() != null && other.getBoundingBox().equals(this.getBoundingBox()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null)
public void marshall(ComparedFace comparedFace, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (comparedFace.getBoundingBox() != null) { BoundingBox boundingBox = comparedFace.getBoundingBox(); jsonWriter.name("BoundingBox"); BoundingBoxJsonMarshaller.getInstance().marshall(boundingBox, jsonWriter);