/** * 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 (getFaceId() != null) sb.append("FaceId: ").append(getFaceId()).append(","); if (getBoundingBox() != null) sb.append("BoundingBox: ").append(getBoundingBox()).append(","); if (getImageId() != null) sb.append("ImageId: ").append(getImageId()).append(","); if (getExternalImageId() != null) sb.append("ExternalImageId: ").append(getExternalImageId()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceId() == null) ? 0 : getFaceId().hashCode()); hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); hashCode = prime * hashCode + ((getExternalImageId() == null) ? 0 : getExternalImageId().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(Face face, ProtocolMarshaller protocolMarshaller) { if (face == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(face.getFaceId(), FACEID_BINDING); protocolMarshaller.marshall(face.getBoundingBox(), BOUNDINGBOX_BINDING); protocolMarshaller.marshall(face.getImageId(), IMAGEID_BINDING); protocolMarshaller.marshall(face.getExternalImageId(), EXTERNALIMAGEID_BINDING); protocolMarshaller.marshall(face.getConfidence(), CONFIDENCE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * 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 (getFaceId() != null) sb.append("FaceId: " + getFaceId() + ","); if (getBoundingBox() != null) sb.append("BoundingBox: " + getBoundingBox() + ","); if (getImageId() != null) sb.append("ImageId: " + getImageId() + ","); if (getExternalImageId() != null) sb.append("ExternalImageId: " + getExternalImageId() + ","); if (getConfidence() != null) sb.append("Confidence: " + getConfidence() + ","); if (getAssociationScore() != null) sb.append("AssociationScore: " + getAssociationScore()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFaceId() == null) ? 0 : getFaceId().hashCode()); hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode()); hashCode = prime * hashCode + ((getExternalImageId() == null) ? 0 : getExternalImageId().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getAssociationScore() == null) ? 0 : getAssociationScore().hashCode()); return hashCode; }