@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; }
/** * <p> * Specifies whether notifications are sent for HITs of this HIT type, according to the notification specification. * You must specify either the Notification parameter or the Active parameter for the call to * UpdateNotificationSettings to succeed. * </p> * * @param active * Specifies whether notifications are sent for HITs of this HIT type, according to the notification * specification. You must specify either the Notification parameter or the Active parameter for the call to * UpdateNotificationSettings to succeed. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateNotificationSettingsRequest withActive(Boolean active) { setActive(active); return this; }
/** * <p> * The ID of the HIT type whose notification specification is being updated. * </p> * * @param hITTypeId * The ID of the HIT type whose notification specification is being updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateNotificationSettingsRequest withHITTypeId(String hITTypeId) { setHITTypeId(hITTypeId); return this; }
/** * <p> * The notification specification for the HIT type. * </p> * * @param notification * The notification specification for the HIT type. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateNotificationSettingsRequest withNotification(NotificationSpecification notification) { setNotification(notification); return this; }
@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; }
/** * 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(); }
/** * 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); } }