@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; }
/** * <p> * Bounding box of the face. * </p> * * @param boundingBox * Bounding box of the face. * @return Returns a reference to this object so that method calls can be chained together. */ public Face withBoundingBox(BoundingBox boundingBox) { setBoundingBox(boundingBox); return this; }
/** * <p> * Confidence level that the bounding box contains a face (and not a different object such as a tree). * </p> * * @param confidence * Confidence level that the bounding box contains a face (and not a different object such as a tree). * @return Returns a reference to this object so that method calls can be chained together. */ public Face withConfidence(Float confidence) { setConfidence(confidence); return this; }
public Face unmarshall(JsonUnmarshallerContext context) throws Exception { Face face = new Face(); if (context.testExpression("FaceId", targetDepth)) { context.nextToken(); face.setFaceId(context.getUnmarshaller(String.class).unmarshall(context)); face.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context)); face.setImageId(context.getUnmarshaller(String.class).unmarshall(context)); face.setExternalImageId(context.getUnmarshaller(String.class).unmarshall(context)); face.setConfidence(context.getUnmarshaller(Float.class).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSimilarity() == null) ? 0 : getSimilarity().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceMatch == false) return false; FaceMatch other = (FaceMatch) obj; if (other.getSimilarity() == null ^ this.getSimilarity() == null) return false; if (other.getSimilarity() != null && other.getSimilarity().equals(this.getSimilarity()) == 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; }
return null; Face face = new Face(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("FaceId")) { face.setFaceId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("BoundingBox")) { face.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ImageId")) { face.setImageId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ExternalImageId")) { face.setExternalImageId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Confidence")) { face.setConfidence(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("AssociationScore")) { face.setAssociationScore(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else {
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); hashCode = prime * hashCode + ((getFaceDetail() == null) ? 0 : getFaceDetail().hashCode()); return hashCode; }
@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; }
return false; Face other = (Face) obj; if (other.getFaceId() == null ^ this.getFaceId() == null) return false; if (other.getFaceId() != null && other.getFaceId().equals(this.getFaceId()) == 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.getImageId() == null ^ this.getImageId() == null) return false; if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false) return false; if (other.getExternalImageId() == null ^ this.getExternalImageId() == null) return false; if (other.getExternalImageId() != null && other.getExternalImageId().equals(this.getExternalImageId()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null) return false; if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == false) return false; return true;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSimilarity() == null) ? 0 : getSimilarity().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FaceMatch == false) return false; FaceMatch other = (FaceMatch) obj; if (other.getSimilarity() == null ^ this.getSimilarity() == null) return false; if (other.getSimilarity() != null && other.getSimilarity().equals(this.getSimilarity()) == 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; } }
/** * 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 + ((getFace() == null) ? 0 : getFace().hashCode()); hashCode = prime * hashCode + ((getFaceDetail() == null) ? 0 : getFaceDetail().hashCode()); return hashCode; }
@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; } }
/** * 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); } }
@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; }
if (other.getFaceId() == null ^ this.getFaceId() == null) return false; if (other.getFaceId() != null && other.getFaceId().equals(this.getFaceId()) == 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.getImageId() == null ^ this.getImageId() == null) return false; if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false) return false; if (other.getExternalImageId() == null ^ this.getExternalImageId() == null) return false; if (other.getExternalImageId() != null && other.getExternalImageId().equals(this.getExternalImageId()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null) return false; if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == false) return false; if (other.getAssociationScore() == null ^ this.getAssociationScore() == null) return false; if (other.getAssociationScore() != null && other.getAssociationScore().equals(this.getAssociationScore()) == 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 (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(); }
public void marshall(Face face, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (face.getFaceId() != null) { String faceId = face.getFaceId(); jsonWriter.name("FaceId"); jsonWriter.value(faceId); if (face.getBoundingBox() != null) { BoundingBox boundingBox = face.getBoundingBox(); jsonWriter.name("BoundingBox"); BoundingBoxJsonMarshaller.getInstance().marshall(boundingBox, jsonWriter); if (face.getImageId() != null) { String imageId = face.getImageId(); jsonWriter.name("ImageId"); jsonWriter.value(imageId); if (face.getExternalImageId() != null) { String externalImageId = face.getExternalImageId(); jsonWriter.name("ExternalImageId"); jsonWriter.value(externalImageId); if (face.getConfidence() != null) { Float confidence = face.getConfidence(); jsonWriter.name("Confidence"); jsonWriter.value(confidence); if (face.getAssociationScore() != null) { Float associationScore = face.getAssociationScore(); jsonWriter.name("AssociationScore");