@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBrightness() == null) ? 0 : getBrightness().hashCode()); hashCode = prime * hashCode + ((getSharpness() == null) ? 0 : getSharpness().hashCode()); return hashCode; }
/** * <p> * Value representing brightness of the face. The service returns a value between 0 and 100 (inclusive). A higher * value indicates a brighter face image. * </p> * * @param brightness * Value representing brightness of the face. The service returns a value between 0 and 100 (inclusive). A * higher value indicates a brighter face image. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageQuality withBrightness(Float brightness) { setBrightness(brightness); return this; }
/** * <p> * Value representing sharpness of the face. The service returns a value between 0 and 100 (inclusive). A higher * value indicates a sharper face image. * </p> * * @param sharpness * Value representing sharpness of the face. The service returns a value between 0 and 100 (inclusive). A * higher value indicates a sharper face image. * @return Returns a reference to this object so that method calls can be chained together. */ public ImageQuality withSharpness(Float sharpness) { setSharpness(sharpness); return this; }
public ImageQuality unmarshall(JsonUnmarshallerContext context) throws Exception { ImageQuality imageQuality = new ImageQuality(); if (context.testExpression("Brightness", targetDepth)) { context.nextToken(); imageQuality.setBrightness(context.getUnmarshaller(Float.class).unmarshall(context)); imageQuality.setSharpness(context.getUnmarshaller(Float.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 + ((getConfidence() == null) ? 0 : getConfidence().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()); return hashCode; }
if (other.getQuality() == null ^ this.getQuality() == null) return false; if (other.getQuality() != null && other.getQuality().equals(this.getQuality()) == false) return false; return true;
public ImageQuality unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } ImageQuality imageQuality = new ImageQuality(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("Brightness")) { imageQuality.setBrightness(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("Sharpness")) { imageQuality.setSharpness(FloatJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return imageQuality; }
@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.getQuality() == null ^ this.getQuality() == null) return false; if (other.getQuality() != null && other.getQuality().equals(this.getQuality()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ImageQuality == false) return false; ImageQuality other = (ImageQuality) obj; if (other.getBrightness() == null ^ this.getBrightness() == null) return false; if (other.getBrightness() != null && other.getBrightness().equals(this.getBrightness()) == false) return false; if (other.getSharpness() == null ^ this.getSharpness() == null) return false; if (other.getSharpness() != null && other.getSharpness().equals(this.getSharpness()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBoundingBox() == null) ? 0 : getBoundingBox().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().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()); return hashCode; }
if (other.getQuality() == null ^ this.getQuality() == null) return false; if (other.getQuality() != null && other.getQuality().equals(this.getQuality()) == 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 (getBrightness() != null) sb.append("Brightness: ").append(getBrightness()).append(","); if (getSharpness() != null) sb.append("Sharpness: ").append(getSharpness()); sb.append("}"); return sb.toString(); }
@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.getQuality() == null ^ this.getQuality() == null) return false; if (other.getQuality() != null && other.getQuality().equals(this.getQuality()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null)
/** * Marshall the given parameter object. */ public void marshall(ImageQuality imageQuality, ProtocolMarshaller protocolMarshaller) { if (imageQuality == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(imageQuality.getBrightness(), BRIGHTNESS_BINDING); protocolMarshaller.marshall(imageQuality.getSharpness(), SHARPNESS_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 + ((getBrightness() == null) ? 0 : getBrightness().hashCode()); hashCode = prime * hashCode + ((getSharpness() == null) ? 0 : getSharpness().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ImageQuality == false) return false; ImageQuality other = (ImageQuality) obj; if (other.getBrightness() == null ^ this.getBrightness() == null) return false; if (other.getBrightness() != null && other.getBrightness().equals(this.getBrightness()) == false) return false; if (other.getSharpness() == null ^ this.getSharpness() == null) return false; if (other.getSharpness() != null && other.getSharpness().equals(this.getSharpness()) == 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 (getBrightness() != null) sb.append("Brightness: " + getBrightness() + ","); if (getSharpness() != null) sb.append("Sharpness: " + getSharpness()); sb.append("}"); return sb.toString(); }
public void marshall(ImageQuality imageQuality, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (imageQuality.getBrightness() != null) { Float brightness = imageQuality.getBrightness(); jsonWriter.name("Brightness"); jsonWriter.value(brightness); } if (imageQuality.getSharpness() != null) { Float sharpness = imageQuality.getSharpness(); jsonWriter.name("Sharpness"); jsonWriter.value(sharpness); } jsonWriter.endObject(); }