@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDate() == null) ? 0 : getDate().hashCode()); hashCode = prime * hashCode + ((getEvent() == null) ? 0 : getEvent().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getError() == null) ? 0 : getError().hashCode()); hashCode = prime * hashCode + ((getSnsTopicArn() == null) ? 0 : getSnsTopicArn().hashCode()); hashCode = prime * hashCode + ((getSnsPublishStatusCode() == null) ? 0 : getSnsPublishStatusCode().hashCode()); return hashCode; }
/** * <p> * The date of the notification. * </p> * * @param date * The date of the notification. * @return Returns a reference to this object so that method calls can be chained together. */ public AssessmentRunNotification withDate(java.util.Date date) { setDate(date); return this; }
/** * <p> * The Boolean value that specifies whether the notification represents an error. * </p> * * @param error * The Boolean value that specifies whether the notification represents an error. * @return Returns a reference to this object so that method calls can be chained together. */ public AssessmentRunNotification withError(Boolean error) { setError(error); return this; }
public AssessmentRunNotification unmarshall(JsonUnmarshallerContext context) throws Exception { AssessmentRunNotification assessmentRunNotification = new AssessmentRunNotification(); if (context.testExpression("date", targetDepth)) { context.nextToken(); assessmentRunNotification.setDate(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRunNotification.setEvent(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunNotification.setMessage(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunNotification.setError(context.getUnmarshaller(Boolean.class).unmarshall(context)); assessmentRunNotification.setSnsTopicArn(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunNotification.setSnsPublishStatusCode(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * The event for which a notification is sent. * </p> * * @param event * The event for which a notification is sent. * @return Returns a reference to this object so that method calls can be chained together. * @see InspectorEvent */ public AssessmentRunNotification withEvent(String event) { setEvent(event); return this; }
public AssessmentRunNotification unmarshall(JsonUnmarshallerContext context) throws Exception { AssessmentRunNotification assessmentRunNotification = new AssessmentRunNotification(); if (context.testExpression("date", targetDepth)) { context.nextToken(); assessmentRunNotification.setDate(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); assessmentRunNotification.setEvent(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunNotification.setMessage(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunNotification.setError(context.getUnmarshaller(Boolean.class).unmarshall(context)); assessmentRunNotification.setSnsTopicArn(context.getUnmarshaller(String.class).unmarshall(context)); assessmentRunNotification.setSnsPublishStatusCode(context.getUnmarshaller(String.class).unmarshall(context));
/** * <p> * The event for which a notification is sent. * </p> * * @param event * The event for which a notification is sent. * @return Returns a reference to this object so that method calls can be chained together. * @see InspectorEvent */ public AssessmentRunNotification withEvent(String event) { setEvent(event); return this; }
return false; AssessmentRunNotification other = (AssessmentRunNotification) obj; if (other.getDate() == null ^ this.getDate() == null) return false; if (other.getDate() != null && other.getDate().equals(this.getDate()) == false) return false; if (other.getEvent() == null ^ this.getEvent() == null) return false; if (other.getEvent() != null && other.getEvent().equals(this.getEvent()) == false) return false; if (other.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false) return false; if (other.getError() == null ^ this.getError() == null) return false; if (other.getError() != null && other.getError().equals(this.getError()) == false) return false; if (other.getSnsTopicArn() == null ^ this.getSnsTopicArn() == null) return false; if (other.getSnsTopicArn() != null && other.getSnsTopicArn().equals(this.getSnsTopicArn()) == false) return false; if (other.getSnsPublishStatusCode() == null ^ this.getSnsPublishStatusCode() == null) return false; if (other.getSnsPublishStatusCode() != null && other.getSnsPublishStatusCode().equals(this.getSnsPublishStatusCode()) == false) return false; return true;
/** * <p> * The Boolean value that specifies whether the notification represents an error. * </p> * * @param error * The Boolean value that specifies whether the notification represents an error. * @return Returns a reference to this object so that method calls can be chained together. */ public AssessmentRunNotification withError(Boolean error) { setError(error); return this; }
/** * <p> * The date of the notification. * </p> * * @param date * The date of the notification. * @return Returns a reference to this object so that method calls can be chained together. */ public AssessmentRunNotification withDate(java.util.Date date) { setDate(date); return this; }
/** * 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 (getDate() != null) sb.append("Date: ").append(getDate()).append(","); if (getEvent() != null) sb.append("Event: ").append(getEvent()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()).append(","); if (getError() != null) sb.append("Error: ").append(getError()).append(","); if (getSnsTopicArn() != null) sb.append("SnsTopicArn: ").append(getSnsTopicArn()).append(","); if (getSnsPublishStatusCode() != null) sb.append("SnsPublishStatusCode: ").append(getSnsPublishStatusCode()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(AssessmentRunNotification assessmentRunNotification, ProtocolMarshaller protocolMarshaller) { if (assessmentRunNotification == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(assessmentRunNotification.getDate(), DATE_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getEvent(), EVENT_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getMessage(), MESSAGE_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getError(), ERROR_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getSnsTopicArn(), SNSTOPICARN_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getSnsPublishStatusCode(), SNSPUBLISHSTATUSCODE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDate() == null) ? 0 : getDate().hashCode()); hashCode = prime * hashCode + ((getEvent() == null) ? 0 : getEvent().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getError() == null) ? 0 : getError().hashCode()); hashCode = prime * hashCode + ((getSnsTopicArn() == null) ? 0 : getSnsTopicArn().hashCode()); hashCode = prime * hashCode + ((getSnsPublishStatusCode() == null) ? 0 : getSnsPublishStatusCode().hashCode()); return hashCode; }
return false; AssessmentRunNotification other = (AssessmentRunNotification) obj; if (other.getDate() == null ^ this.getDate() == null) return false; if (other.getDate() != null && other.getDate().equals(this.getDate()) == false) return false; if (other.getEvent() == null ^ this.getEvent() == null) return false; if (other.getEvent() != null && other.getEvent().equals(this.getEvent()) == false) return false; if (other.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false) return false; if (other.getError() == null ^ this.getError() == null) return false; if (other.getError() != null && other.getError().equals(this.getError()) == false) return false; if (other.getSnsTopicArn() == null ^ this.getSnsTopicArn() == null) return false; if (other.getSnsTopicArn() != null && other.getSnsTopicArn().equals(this.getSnsTopicArn()) == false) return false; if (other.getSnsPublishStatusCode() == null ^ this.getSnsPublishStatusCode() == null) return false; if (other.getSnsPublishStatusCode() != null && other.getSnsPublishStatusCode().equals(this.getSnsPublishStatusCode()) == 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 (getDate() != null) sb.append("Date: ").append(getDate()).append(","); if (getEvent() != null) sb.append("Event: ").append(getEvent()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()).append(","); if (getError() != null) sb.append("Error: ").append(getError()).append(","); if (getSnsTopicArn() != null) sb.append("SnsTopicArn: ").append(getSnsTopicArn()).append(","); if (getSnsPublishStatusCode() != null) sb.append("SnsPublishStatusCode: ").append(getSnsPublishStatusCode()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(AssessmentRunNotification assessmentRunNotification, ProtocolMarshaller protocolMarshaller) { if (assessmentRunNotification == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(assessmentRunNotification.getDate(), DATE_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getEvent(), EVENT_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getMessage(), MESSAGE_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getError(), ERROR_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getSnsTopicArn(), SNSTOPICARN_BINDING); protocolMarshaller.marshall(assessmentRunNotification.getSnsPublishStatusCode(), SNSPUBLISHSTATUSCODE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }