/** * <p> * The highest estimated age. * </p> * * @param high * The highest estimated age. * @return Returns a reference to this object so that method calls can be chained together. */ public AgeRange withHigh(Integer high) { setHigh(high); return this; }
/** * <p> * The lowest estimated age. * </p> * * @param low * The lowest estimated age. * @return Returns a reference to this object so that method calls can be chained together. */ public AgeRange withLow(Integer low) { setLow(low); return this; }
public AgeRange unmarshall(JsonUnmarshallerContext context) throws Exception { AgeRange ageRange = new AgeRange(); if (context.testExpression("Low", targetDepth)) { context.nextToken(); ageRange.setLow(context.getUnmarshaller(Integer.class).unmarshall(context)); ageRange.setHigh(context.getUnmarshaller(Integer.class).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getAgeRange() == null) ? 0 : getAgeRange().hashCode()); hashCode = prime * hashCode + ((getSmile() == null) ? 0 : getSmile().hashCode()); hashCode = prime * hashCode + ((getEyeglasses() == null) ? 0 : getEyeglasses().hashCode()); hashCode = prime * hashCode + ((getSunglasses() == null) ? 0 : getSunglasses().hashCode()); hashCode = prime * hashCode + ((getGender() == null) ? 0 : getGender().hashCode()); hashCode = prime * hashCode + ((getBeard() == null) ? 0 : getBeard().hashCode()); hashCode = prime * hashCode + ((getMustache() == null) ? 0 : getMustache().hashCode()); hashCode = prime * hashCode + ((getEyesOpen() == null) ? 0 : getEyesOpen().hashCode()); hashCode = prime * hashCode + ((getMouthOpen() == null) ? 0 : getMouthOpen().hashCode()); hashCode = prime * hashCode + ((getEmotions() == null) ? 0 : getEmotions().hashCode()); hashCode = prime * hashCode + ((getLandmarks() == null) ? 0 : getLandmarks().hashCode()); hashCode = prime * hashCode + ((getPose() == null) ? 0 : getPose().hashCode()); hashCode = prime * hashCode + ((getQuality() == null) ? 0 : getQuality().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); return hashCode; }
if (other.getAgeRange() == null ^ this.getAgeRange() == null) return false; if (other.getAgeRange() != null && other.getAgeRange().equals(this.getAgeRange()) == false) return false; if (other.getSmile() == null ^ this.getSmile() == null)
public AgeRange unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } AgeRange ageRange = new AgeRange(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Low")) { ageRange.setLow(IntegerJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("High")) { ageRange.setHigh(IntegerJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return ageRange; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getAgeRange() == null) ? 0 : getAgeRange().hashCode()); hashCode = prime * hashCode + ((getSmile() == null) ? 0 : getSmile().hashCode()); hashCode = prime * hashCode + ((getEyeglasses() == null) ? 0 : getEyeglasses().hashCode()); hashCode = prime * hashCode + ((getSunglasses() == null) ? 0 : getSunglasses().hashCode()); hashCode = prime * hashCode + ((getGender() == null) ? 0 : getGender().hashCode()); hashCode = prime * hashCode + ((getBeard() == null) ? 0 : getBeard().hashCode()); hashCode = prime * hashCode + ((getMustache() == null) ? 0 : getMustache().hashCode()); hashCode = prime * hashCode + ((getEyesOpen() == null) ? 0 : getEyesOpen().hashCode()); hashCode = prime * hashCode + ((getMouthOpen() == null) ? 0 : getMouthOpen().hashCode()); hashCode = prime * hashCode + ((getEmotions() == null) ? 0 : getEmotions().hashCode()); hashCode = prime * hashCode + ((getLandmarks() == null) ? 0 : getLandmarks().hashCode()); hashCode = prime * hashCode + ((getPose() == null) ? 0 : getPose().hashCode()); hashCode = prime * hashCode + ((getQuality() == null) ? 0 : getQuality().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); return hashCode; }
if (other.getAgeRange() == null ^ this.getAgeRange() == null) return false; if (other.getAgeRange() != null && other.getAgeRange().equals(this.getAgeRange()) == false) return false; if (other.getSmile() == null ^ this.getSmile() == null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AgeRange == false) return false; AgeRange other = (AgeRange) obj; if (other.getLow() == null ^ this.getLow() == null) return false; if (other.getLow() != null && other.getLow().equals(this.getLow()) == false) return false; if (other.getHigh() == null ^ this.getHigh() == null) return false; if (other.getHigh() != null && other.getHigh().equals(this.getHigh()) == 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 (getLow() != null) sb.append("Low: ").append(getLow()).append(","); if (getHigh() != null) sb.append("High: ").append(getHigh()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(AgeRange ageRange, ProtocolMarshaller protocolMarshaller) { if (ageRange == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(ageRange.getLow(), LOW_BINDING); protocolMarshaller.marshall(ageRange.getHigh(), HIGH_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AgeRange == false) return false; AgeRange other = (AgeRange) obj; if (other.getLow() == null ^ this.getLow() == null) return false; if (other.getLow() != null && other.getLow().equals(this.getLow()) == false) return false; if (other.getHigh() == null ^ this.getHigh() == null) return false; if (other.getHigh() != null && other.getHigh().equals(this.getHigh()) == 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 (getLow() != null) sb.append("Low: " + getLow() + ","); if (getHigh() != null) sb.append("High: " + getHigh()); sb.append("}"); return sb.toString(); }
public void marshall(AgeRange ageRange, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (ageRange.getLow() != null) { Integer low = ageRange.getLow(); jsonWriter.name("Low"); jsonWriter.value(low); } if (ageRange.getHigh() != null) { Integer high = ageRange.getHigh(); jsonWriter.name("High"); jsonWriter.value(high); } jsonWriter.endObject(); }