/** * 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(); }
@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; }
/** * 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); } }