@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUrls() == null) ? 0 : getUrls().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); return hashCode; }
/** * <p> * Bounding box around the body of a celebrity. * </p> * * @param boundingBox * Bounding box around the body of a celebrity. * @return Returns a reference to this object so that method calls can be chained together. */ public CelebrityDetail withBoundingBox(BoundingBox boundingBox) { setBoundingBox(boundingBox); return this; }
public CelebrityDetail unmarshall(JsonUnmarshallerContext context) throws Exception { CelebrityDetail celebrityDetail = new CelebrityDetail(); if (context.testExpression("Urls", targetDepth)) { context.nextToken(); celebrityDetail.setUrls(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); celebrityDetail.setName(context.getUnmarshaller(String.class).unmarshall(context)); celebrityDetail.setId(context.getUnmarshaller(String.class).unmarshall(context)); celebrityDetail.setConfidence(context.getUnmarshaller(Float.class).unmarshall(context)); celebrityDetail.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance().unmarshall(context)); celebrityDetail.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 + ((getCelebrity() == null) ? 0 : getCelebrity().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CelebrityRecognition == false) return false; CelebrityRecognition other = (CelebrityRecognition) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getCelebrity() == null ^ this.getCelebrity() == null) return false; if (other.getCelebrity() != null && other.getCelebrity().equals(this.getCelebrity()) == false) return false; return true; }
/** * <p> * An array of URLs pointing to additional celebrity information. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * * @param urls <p> * An array of URLs pointing to additional celebrity information. * </p> * @return A reference to this updated object so that method calls can be * chained together. */ public CelebrityDetail withUrls(String... urls) { if (getUrls() == null) { this.urls = new java.util.ArrayList<String>(urls.length); } for (String value : urls) { this.urls.add(value); } return this; }
return null; CelebrityDetail celebrityDetail = new CelebrityDetail(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Urls")) { celebrityDetail.setUrls(new ListUnmarshaller<String>(StringJsonUnmarshaller .getInstance() celebrityDetail.setName(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Id")) { celebrityDetail.setId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Confidence")) { celebrityDetail.setConfidence(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("BoundingBox")) { celebrityDetail.setBoundingBox(BoundingBoxJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Face")) { celebrityDetail.setFace(FaceDetailJsonUnmarshaller.getInstance() .unmarshall(context)); } else {
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getCelebrity() == null) ? 0 : getCelebrity().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CelebrityRecognition == false) return false; CelebrityRecognition other = (CelebrityRecognition) obj; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; if (other.getCelebrity() == null ^ this.getCelebrity() == null) return false; if (other.getCelebrity() != null && other.getCelebrity().equals(this.getCelebrity()) == false) return false; return true; } }
return false; CelebrityDetail other = (CelebrityDetail) obj; if (other.getUrls() == null ^ this.getUrls() == null) return false; if (other.getUrls() != null && other.getUrls().equals(this.getUrls()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == 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.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. 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 (getUrls() != null) sb.append("Urls: ").append(getUrls()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getBoundingBox() != null) sb.append("BoundingBox: ").append(getBoundingBox()).append(","); if (getFace() != null) sb.append("Face: ").append(getFace()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(CelebrityDetail celebrityDetail, ProtocolMarshaller protocolMarshaller) { if (celebrityDetail == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(celebrityDetail.getUrls(), URLS_BINDING); protocolMarshaller.marshall(celebrityDetail.getName(), NAME_BINDING); protocolMarshaller.marshall(celebrityDetail.getId(), ID_BINDING); protocolMarshaller.marshall(celebrityDetail.getConfidence(), CONFIDENCE_BINDING); protocolMarshaller.marshall(celebrityDetail.getBoundingBox(), BOUNDINGBOX_BINDING); protocolMarshaller.marshall(celebrityDetail.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 + ((getUrls() == null) ? 0 : getUrls().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode()); return hashCode; }
if (other.getUrls() == null ^ this.getUrls() == null) return false; if (other.getUrls() != null && other.getUrls().equals(this.getUrls()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == 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.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 (getUrls() != null) sb.append("Urls: " + getUrls() + ","); if (getName() != null) sb.append("Name: " + getName() + ","); if (getId() != null) sb.append("Id: " + getId() + ","); if (getConfidence() != null) sb.append("Confidence: " + getConfidence() + ","); if (getBoundingBox() != null) sb.append("BoundingBox: " + getBoundingBox() + ","); if (getFace() != null) sb.append("Face: " + getFace()); sb.append("}"); return sb.toString(); }
public void marshall(CelebrityDetail celebrityDetail, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (celebrityDetail.getUrls() != null) { java.util.List<String> urls = celebrityDetail.getUrls(); jsonWriter.name("Urls"); jsonWriter.beginArray(); if (celebrityDetail.getName() != null) { String name = celebrityDetail.getName(); jsonWriter.name("Name"); jsonWriter.value(name); if (celebrityDetail.getId() != null) { String id = celebrityDetail.getId(); jsonWriter.name("Id"); jsonWriter.value(id); if (celebrityDetail.getConfidence() != null) { Float confidence = celebrityDetail.getConfidence(); jsonWriter.name("Confidence"); jsonWriter.value(confidence); if (celebrityDetail.getBoundingBox() != null) { BoundingBox boundingBox = celebrityDetail.getBoundingBox(); jsonWriter.name("BoundingBox"); BoundingBoxJsonMarshaller.getInstance().marshall(boundingBox, jsonWriter); if (celebrityDetail.getFace() != null) { FaceDetail face = celebrityDetail.getFace();