@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; }
/** * <p> * Describes the face properties such as the bounding box, face ID, image ID of the input image, and external image * ID that you assigned. * </p> * * @param face * Describes the face properties such as the bounding box, face ID, image ID of the input image, and external * image ID that you assigned. * @return Returns a reference to this object so that method calls can be chained together. */ public FaceRecord withFace(Face face) { setFace(face); return this; }
/** * <p> * Structure containing attributes of the face that the algorithm detected. * </p> * * @param faceDetail * Structure containing attributes of the face that the algorithm detected. * @return Returns a reference to this object so that method calls can be chained together. */ public FaceRecord withFaceDetail(FaceDetail faceDetail) { setFaceDetail(faceDetail); return this; }
public FaceRecord unmarshall(JsonUnmarshallerContext context) throws Exception { FaceRecord faceRecord = new FaceRecord(); if (context.testExpression("Face", targetDepth)) { context.nextToken(); faceRecord.setFace(FaceJsonUnmarshaller.getInstance().unmarshall(context)); faceRecord.setFaceDetail(FaceDetailJsonUnmarshaller.getInstance().unmarshall(context));
public FaceRecord unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } FaceRecord faceRecord = new FaceRecord(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Face")) { faceRecord.setFace(FaceJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("FaceDetail")) { faceRecord.setFaceDetail(FaceDetailJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return faceRecord; }
@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; }
/** * 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 (getFace() != null) sb.append("Face: ").append(getFace()).append(","); if (getFaceDetail() != null) sb.append("FaceDetail: ").append(getFaceDetail()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(FaceRecord faceRecord, ProtocolMarshaller protocolMarshaller) { if (faceRecord == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(faceRecord.getFace(), FACE_BINDING); protocolMarshaller.marshall(faceRecord.getFaceDetail(), FACEDETAIL_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 + ((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; } }
/** * 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 (getFace() != null) sb.append("Face: " + getFace() + ","); if (getFaceDetail() != null) sb.append("FaceDetail: " + getFaceDetail()); sb.append("}"); return sb.toString(); }
public void marshall(FaceRecord faceRecord, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (faceRecord.getFace() != null) { Face face = faceRecord.getFace(); jsonWriter.name("Face"); FaceJsonMarshaller.getInstance().marshall(face, jsonWriter); } if (faceRecord.getFaceDetail() != null) { FaceDetail faceDetail = faceRecord.getFaceDetail(); jsonWriter.name("FaceDetail"); FaceDetailJsonMarshaller.getInstance().marshall(faceDetail, jsonWriter); } jsonWriter.endObject(); }