@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIndex() == null) ? 0 : getIndex().hashCode()); hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); return hashCode; }
/** * <p> * Bounding box around the detected person. * </p> * * @param boundingBox * Bounding box around the detected person. * @return Returns a reference to this object so that method calls can be chained together. */ public PersonDetail withBoundingBox(BoundingBox boundingBox) { setBoundingBox(boundingBox); return this; }
/** * <p> * Face details for the detected person. * </p> * * @param face * Face details for the detected person. * @return Returns a reference to this object so that method calls can be chained together. */ public PersonDetail withFace(FaceDetail face) { setFace(face); return this; }
public PersonDetail unmarshall(JsonUnmarshallerContext context) throws Exception { PersonDetail personDetail = new PersonDetail(); if (context.testExpression("Index", targetDepth)) { context.nextToken(); personDetail.setIndex(context.getUnmarshaller(Long.class).unmarshall(context)); personDetail.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context)); personDetail.setFace(FaceDetailJsonUnmarshaller.getInstance().unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getPerson() == null) ? 0 : getPerson().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PersonDetection == false) return false; PersonDetection other = (PersonDetection) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getPerson() == null ^ this.getPerson() == null) return false; if (other.getPerson() != null && other.getPerson().equals(this.getPerson()) == false) return false; return true; }
/** * <p> * Identifier for the person detected person within a video. Use to keep track of the person throughout the video. * The identifier is not stored by Amazon Rekognition. * </p> * * @param index * Identifier for the person detected person within a video. Use to keep track of the person throughout the * video. The identifier is not stored by Amazon Rekognition. * @return Returns a reference to this object so that method calls can be chained together. */ public PersonDetail withIndex(Long index) { setIndex(index); return this; }
public PersonDetail unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } PersonDetail personDetail = new PersonDetail(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Index")) { personDetail.setIndex(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("BoundingBox")) { personDetail.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Face")) { personDetail.setFace(FaceDetailJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return personDetail; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getPerson() == null) ? 0 : getPerson().hashCode()); hashCode = prime * hashCode + ((getFaceMatches() == null) ? 0 : getFaceMatches().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PersonMatch == false) return false; PersonMatch other = (PersonMatch) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getPerson() == null ^ this.getPerson() == null) return false; if (other.getPerson() != null && other.getPerson().equals(this.getPerson()) == false) return false; if (other.getFaceMatches() == null ^ this.getFaceMatches() == null) return false; if (other.getFaceMatches() != null && other.getFaceMatches().equals(this.getFaceMatches()) == false) return false; return true; }
@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; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getPerson() == null) ? 0 : getPerson().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PersonDetection == false) return false; PersonDetection other = (PersonDetection) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getPerson() == null ^ this.getPerson() == null) return false; if (other.getPerson() != null && other.getPerson().equals(this.getPerson()) == 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 (getIndex() != null) sb.append("Index: ").append(getIndex()).append(","); if (getBoundingBox() != null) sb.append("BoundingBox: ").append(getBoundingBox()).append(","); if (getFace() != null) sb.append("Face: ").append(getFace()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getPerson() == null) ? 0 : getPerson().hashCode()); hashCode = prime * hashCode + ((getFaceMatches() == null) ? 0 : getFaceMatches().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PersonMatch == false) return false; PersonMatch other = (PersonMatch) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getPerson() == null ^ this.getPerson() == null) return false; if (other.getPerson() != null && other.getPerson().equals(this.getPerson()) == false) return false; if (other.getFaceMatches() == null ^ this.getFaceMatches() == null) return false; if (other.getFaceMatches() != null && other.getFaceMatches().equals(this.getFaceMatches()) == false) return false; return true; } }
/** * Marshall the given parameter object. */ public void marshall(PersonDetail personDetail, ProtocolMarshaller protocolMarshaller) { if (personDetail == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(personDetail.getIndex(), INDEX_BINDING); protocolMarshaller.marshall(personDetail.getBoundingBox(), BOUNDINGBOX_BINDING); protocolMarshaller.marshall(personDetail.getFace(), FACE_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 + ((getIndex() == null) ? 0 : getIndex().hashCode()); hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().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 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; } }
/** * 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 (getIndex() != null) sb.append("Index: " + getIndex() + ","); if (getBoundingBox() != null) sb.append("BoundingBox: " + getBoundingBox() + ","); if (getFace() != null) sb.append("Face: " + getFace()); sb.append("}"); return sb.toString(); }