/** * 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 (getHITTypeId() != null) sb.append("HITTypeId: ").append(getHITTypeId()).append(","); if (getNotification() != null) sb.append("Notification: ").append(getNotification()).append(","); if (getActive() != null) sb.append("Active: ").append(getActive()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHITTypeId() == null) ? 0 : getHITTypeId().hashCode()); hashCode = prime * hashCode + ((getNotification() == null) ? 0 : getNotification().hashCode()); hashCode = prime * hashCode + ((getActive() == null) ? 0 : getActive().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateNotificationSettingsRequest == false) return false; UpdateNotificationSettingsRequest other = (UpdateNotificationSettingsRequest) obj; if (other.getHITTypeId() == null ^ this.getHITTypeId() == null) return false; if (other.getHITTypeId() != null && other.getHITTypeId().equals(this.getHITTypeId()) == false) return false; if (other.getNotification() == null ^ this.getNotification() == null) return false; if (other.getNotification() != null && other.getNotification().equals(this.getNotification()) == false) return false; if (other.getActive() == null ^ this.getActive() == null) return false; if (other.getActive() != null && other.getActive().equals(this.getActive()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(UpdateNotificationSettingsRequest updateNotificationSettingsRequest, ProtocolMarshaller protocolMarshaller) { if (updateNotificationSettingsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateNotificationSettingsRequest.getHITTypeId(), HITTYPEID_BINDING); protocolMarshaller.marshall(updateNotificationSettingsRequest.getNotification(), NOTIFICATION_BINDING); protocolMarshaller.marshall(updateNotificationSettingsRequest.getActive(), ACTIVE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }