@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getWorkerId() == null) ? 0 : getWorkerId().hashCode()); hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode()); return hashCode; }
/** * <p> * A message explaining the reason for blocking the Worker. This parameter enables you to keep track of your * Workers. The Worker does not see this message. * </p> * * @param reason * A message explaining the reason for blocking the Worker. This parameter enables you to keep track of your * Workers. The Worker does not see this message. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkerBlockRequest withReason(String reason) { setReason(reason); return this; }
/** * <p> * The ID of the Worker to block. * </p> * * @param workerId * The ID of the Worker to block. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkerBlockRequest withWorkerId(String workerId) { setWorkerId(workerId); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateWorkerBlockRequest == false) return false; CreateWorkerBlockRequest other = (CreateWorkerBlockRequest) obj; if (other.getWorkerId() == null ^ this.getWorkerId() == null) return false; if (other.getWorkerId() != null && other.getWorkerId().equals(this.getWorkerId()) == false) return false; if (other.getReason() == null ^ this.getReason() == null) return false; if (other.getReason() != null && other.getReason().equals(this.getReason()) == 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 (getReason() != null) sb.append("Reason: ").append(getReason()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(CreateWorkerBlockRequest createWorkerBlockRequest, ProtocolMarshaller protocolMarshaller) { if (createWorkerBlockRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createWorkerBlockRequest.getWorkerId(), WORKERID_BINDING); protocolMarshaller.marshall(createWorkerBlockRequest.getReason(), REASON_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }