@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; }
/** * <p> * The ID of the assignment associated with this bonus payment. * </p> * * @param assignmentId * The ID of the assignment associated with this bonus payment. * @return Returns a reference to this object so that method calls can be chained together. */ public BonusPayment withAssignmentId(String assignmentId) { setAssignmentId(assignmentId); return this; }
/** * @param bonusAmount * @return Returns a reference to this object so that method calls can be chained together. */ public BonusPayment withBonusAmount(String bonusAmount) { setBonusAmount(bonusAmount); return this; }
public BonusPayment unmarshall(JsonUnmarshallerContext context) throws Exception { BonusPayment bonusPayment = new BonusPayment(); if (context.testExpression("WorkerId", targetDepth)) { context.nextToken(); bonusPayment.setWorkerId(context.getUnmarshaller(String.class).unmarshall(context)); bonusPayment.setBonusAmount(context.getUnmarshaller(String.class).unmarshall(context)); bonusPayment.setAssignmentId(context.getUnmarshaller(String.class).unmarshall(context)); bonusPayment.setReason(context.getUnmarshaller(String.class).unmarshall(context)); bonusPayment.setGrantTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
/** * <p> * The date and time of when the bonus was granted. * </p> * * @param grantTime * The date and time of when the bonus was granted. * @return Returns a reference to this object so that method calls can be chained together. */ public BonusPayment withGrantTime(java.util.Date grantTime) { setGrantTime(grantTime); return this; }
/** * <p> * The Reason text given when the bonus was granted, if any. * </p> * * @param reason * The Reason text given when the bonus was granted, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public BonusPayment withReason(String reason) { setReason(reason); return this; }
return false; BonusPayment other = (BonusPayment) obj; if (other.getWorkerId() == null ^ this.getWorkerId() == null) return false; 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) return false; if (other.getAssignmentId() != null && other.getAssignmentId().equals(this.getAssignmentId()) == false) return false; if (other.getReason() == null ^ this.getReason() == null) return false; if (other.getReason() != null && other.getReason().equals(this.getReason()) == false) return false; if (other.getGrantTime() == null ^ this.getGrantTime() == null) return false; if (other.getGrantTime() != null && other.getGrantTime().equals(this.getGrantTime()) == 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 (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(); }
/** * 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); } }