@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWorkerId() == null) ? 0 : getWorkerId().hashCode()); hashCode = prime * hashCode + ((getBonusAmount() == null) ? 0 : getBonusAmount().hashCode()); hashCode = prime * hashCode + ((getAssignmentId() == null) ? 0 : getAssignmentId().hashCode()); hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode()); hashCode = prime * hashCode + ((getGrantTime() == null) ? 0 : getGrantTime().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 (getWorkerId() != null) sb.append("WorkerId: ").append(getWorkerId()).append(","); if (getBonusAmount() != null) sb.append("BonusAmount: ").append(getBonusAmount()).append(","); if (getAssignmentId() != null) sb.append("AssignmentId: ").append(getAssignmentId()).append(","); if (getReason() != null) sb.append("Reason: ").append(getReason()).append(","); if (getGrantTime() != null) sb.append("GrantTime: ").append(getGrantTime()); sb.append("}"); return sb.toString(); }
if (other.getWorkerId() != null && other.getWorkerId().equals(this.getWorkerId()) == false) return false; if (other.getBonusAmount() == null ^ this.getBonusAmount() == null) return false; if (other.getBonusAmount() != null && other.getBonusAmount().equals(this.getBonusAmount()) == false) return false; if (other.getAssignmentId() == null ^ this.getAssignmentId() == null)
/** * Marshall the given parameter object. */ public void marshall(BonusPayment bonusPayment, ProtocolMarshaller protocolMarshaller) { if (bonusPayment == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(bonusPayment.getWorkerId(), WORKERID_BINDING); protocolMarshaller.marshall(bonusPayment.getBonusAmount(), BONUSAMOUNT_BINDING); protocolMarshaller.marshall(bonusPayment.getAssignmentId(), ASSIGNMENTID_BINDING); protocolMarshaller.marshall(bonusPayment.getReason(), REASON_BINDING); protocolMarshaller.marshall(bonusPayment.getGrantTime(), GRANTTIME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }