@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Emotion == false) return false; Emotion other = (Emotion) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null) return false; if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(Emotion emotion, ProtocolMarshaller protocolMarshaller) { if (emotion == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(emotion.getType(), TYPE_BINDING); protocolMarshaller.marshall(emotion.getConfidence(), CONFIDENCE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * 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 (getType() != null) sb.append("Type: " + getType() + ","); if (getConfidence() != null) sb.append("Confidence: " + getConfidence()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Emotion == false) return false; Emotion other = (Emotion) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getConfidence() == null ^ this.getConfidence() == null) return false; if (other.getConfidence() != null && other.getConfidence().equals(this.getConfidence()) == false) return false; return true; } }
public void marshall(Emotion emotion, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (emotion.getType() != null) { String type = emotion.getType(); jsonWriter.name("Type"); jsonWriter.value(type); } if (emotion.getConfidence() != null) { Float confidence = emotion.getConfidence(); jsonWriter.name("Confidence"); jsonWriter.value(confidence); } jsonWriter.endObject(); }