@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; }
/** * 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 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; }
/** * 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; }
/** * 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(); }
@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; } }
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(); }