@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; }
/** * <p> * The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition * operations, passing base64-encoded image bytes is not supported. * </p> * * @param image * The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to call Amazon Rekognition * operations, passing base64-encoded image bytes is not supported. * @return Returns a reference to this object so that method calls can be chained together. */ public DetectModerationLabelsRequest withImage(Image image) { setImage(image); return this; }
/** * <p> * Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any labels * with a confidence level lower than this specified value. * </p> * <p> * If you don't specify <code>MinConfidence</code>, the operation returns labels with confidence values greater than * or equal to 50 percent. * </p> * * @param minConfidence * Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return any * labels with a confidence level lower than this specified value.</p> * <p> * If you don't specify <code>MinConfidence</code>, the operation returns labels with confidence values * greater than or equal to 50 percent. * @return Returns a reference to this object so that method calls can be chained together. */ public DetectModerationLabelsRequest withMinConfidence(Float minConfidence) { setMinConfidence(minConfidence); return this; }
@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; }
/** * Constructs a new DetectModerationLabelsRequest object. Callers should use * the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param image <p> * The input image as base64-encoded bytes or an S3 object. If * you use the AWS CLI to call Amazon Rekognition operations, * passing base64-encoded image bytes is not supported. * </p> */ public DetectModerationLabelsRequest(Image image) { setImage(image); }
/** * 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(); }
/** * 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; }
@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; } }
/** * 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(); }
jsonWriter.beginObject(); if (detectModerationLabelsRequest.getImage() != null) { Image image = detectModerationLabelsRequest.getImage(); jsonWriter.name("Image"); ImageJsonMarshaller.getInstance().marshall(image, jsonWriter); if (detectModerationLabelsRequest.getMinConfidence() != null) { Float minConfidence = detectModerationLabelsRequest.getMinConfidence(); jsonWriter.name("MinConfidence"); jsonWriter.value(minConfidence);