@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNegated() == null) ? 0 : getNegated().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getDataId() == null) ? 0 : getDataId().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 (getNegated() != null) sb.append("Negated: ").append(getNegated()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getDataId() != null) sb.append("DataId: ").append(getDataId()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Predicate == false) return false; Predicate other = (Predicate) obj; if (other.getNegated() == null ^ this.getNegated() == null) return false; if (other.getNegated() != null && other.getNegated().equals(this.getNegated()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getDataId() == null ^ this.getDataId() == null) return false; if (other.getDataId() != null && other.getDataId().equals(this.getDataId()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(Predicate predicate, ProtocolMarshaller protocolMarshaller) { if (predicate == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(predicate.getNegated(), NEGATED_BINDING); protocolMarshaller.marshall(predicate.getType(), TYPE_BINDING); protocolMarshaller.marshall(predicate.getDataId(), DATAID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Marshall the given parameter object. */ public void marshall(Predicate predicate, ProtocolMarshaller protocolMarshaller) { if (predicate == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(predicate.getNegated(), NEGATED_BINDING); protocolMarshaller.marshall(predicate.getType(), TYPE_BINDING); protocolMarshaller.marshall(predicate.getDataId(), DATAID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }