/** * 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 (getConditionCheck() != null) sb.append("ConditionCheck: ").append(getConditionCheck()).append(","); if (getPut() != null) sb.append("Put: ").append(getPut()).append(","); if (getDelete() != null) sb.append("Delete: ").append(getDelete()).append(","); if (getUpdate() != null) sb.append("Update: ").append(getUpdate()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(TransactWriteItem transactWriteItem, ProtocolMarshaller protocolMarshaller) { if (transactWriteItem == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(transactWriteItem.getConditionCheck(), CONDITIONCHECK_BINDING); protocolMarshaller.marshall(transactWriteItem.getPut(), PUT_BINDING); protocolMarshaller.marshall(transactWriteItem.getDelete(), DELETE_BINDING); protocolMarshaller.marshall(transactWriteItem.getUpdate(), UPDATE_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 + ((getConditionCheck() == null) ? 0 : getConditionCheck().hashCode()); hashCode = prime * hashCode + ((getPut() == null) ? 0 : getPut().hashCode()); hashCode = prime * hashCode + ((getDelete() == null) ? 0 : getDelete().hashCode()); hashCode = prime * hashCode + ((getUpdate() == null) ? 0 : getUpdate().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TransactWriteItem == false) return false; TransactWriteItem other = (TransactWriteItem) obj; if (other.getConditionCheck() == null ^ this.getConditionCheck() == null) return false; if (other.getConditionCheck() != null && other.getConditionCheck().equals(this.getConditionCheck()) == false) return false; if (other.getPut() == null ^ this.getPut() == null) return false; if (other.getPut() != null && other.getPut().equals(this.getPut()) == false) return false; if (other.getDelete() == null ^ this.getDelete() == null) return false; if (other.getDelete() != null && other.getDelete().equals(this.getDelete()) == false) return false; if (other.getUpdate() == null ^ this.getUpdate() == null) return false; if (other.getUpdate() != null && other.getUpdate().equals(this.getUpdate()) == 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 (getConditionCheck() != null) sb.append("ConditionCheck: ").append(getConditionCheck()).append(","); if (getPut() != null) sb.append("Put: ").append(getPut()).append(","); if (getDelete() != null) sb.append("Delete: ").append(getDelete()).append(","); if (getUpdate() != null) sb.append("Update: ").append(getUpdate()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(TransactWriteItem transactWriteItem, ProtocolMarshaller protocolMarshaller) { if (transactWriteItem == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(transactWriteItem.getConditionCheck(), CONDITIONCHECK_BINDING); protocolMarshaller.marshall(transactWriteItem.getPut(), PUT_BINDING); protocolMarshaller.marshall(transactWriteItem.getDelete(), DELETE_BINDING); protocolMarshaller.marshall(transactWriteItem.getUpdate(), UPDATE_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 + ((getConditionCheck() == null) ? 0 : getConditionCheck().hashCode()); hashCode = prime * hashCode + ((getPut() == null) ? 0 : getPut().hashCode()); hashCode = prime * hashCode + ((getDelete() == null) ? 0 : getDelete().hashCode()); hashCode = prime * hashCode + ((getUpdate() == null) ? 0 : getUpdate().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TransactWriteItem == false) return false; TransactWriteItem other = (TransactWriteItem) obj; if (other.getConditionCheck() == null ^ this.getConditionCheck() == null) return false; if (other.getConditionCheck() != null && other.getConditionCheck().equals(this.getConditionCheck()) == false) return false; if (other.getPut() == null ^ this.getPut() == null) return false; if (other.getPut() != null && other.getPut().equals(this.getPut()) == false) return false; if (other.getDelete() == null ^ this.getDelete() == null) return false; if (other.getDelete() != null && other.getDelete().equals(this.getDelete()) == false) return false; if (other.getUpdate() == null ^ this.getUpdate() == null) return false; if (other.getUpdate() != null && other.getUpdate().equals(this.getUpdate()) == false) return false; return true; }