/** * 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 (getImage() != null) sb.append("Image: ").append(getImage()).append(","); if (getMinConfidence() != null) sb.append("MinConfidence: ").append(getMinConfidence()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getMinConfidence() == null) ? 0 : getMinConfidence().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectModerationLabelsRequest == false) return false; DetectModerationLabelsRequest other = (DetectModerationLabelsRequest) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getMinConfidence() == null ^ this.getMinConfidence() == null) return false; if (other.getMinConfidence() != null && other.getMinConfidence().equals(this.getMinConfidence()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(DetectModerationLabelsRequest detectModerationLabelsRequest, ProtocolMarshaller protocolMarshaller) { if (detectModerationLabelsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(detectModerationLabelsRequest.getImage(), IMAGE_BINDING); protocolMarshaller.marshall(detectModerationLabelsRequest.getMinConfidence(), MINCONFIDENCE_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 + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getMinConfidence() == null) ? 0 : getMinConfidence().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 (getImage() != null) sb.append("Image: " + getImage() + ","); if (getMinConfidence() != null) sb.append("MinConfidence: " + getMinConfidence()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DetectModerationLabelsRequest == false) return false; DetectModerationLabelsRequest other = (DetectModerationLabelsRequest) obj; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getMinConfidence() == null ^ this.getMinConfidence() == null) return false; if (other.getMinConfidence() != null && other.getMinConfidence().equals(this.getMinConfidence()) == false) return false; return true; } }
ImageJsonMarshaller.getInstance().marshall(image, jsonWriter); if (detectModerationLabelsRequest.getMinConfidence() != null) { Float minConfidence = detectModerationLabelsRequest.getMinConfidence(); jsonWriter.name("MinConfidence"); jsonWriter.value(minConfidence);