@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSourceIdentifier() == null) ? 0 : getSourceIdentifier().hashCode()); hashCode = prime * hashCode + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getDate() == null) ? 0 : getDate().hashCode()); return hashCode; }
/** * <p> * The date and time when the event occurred. * </p> * * @param date * The date and time when the event occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withDate(java.util.Date date) { setDate(date); return this; }
/** * <p> * The text of the event. * </p> * * @param message * The text of the event. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withMessage(String message) { setMessage(message); return this; }
public Event unmarshall(StaxUnmarshallerContext context) throws Exception { Event event = new Event(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; event.setSourceIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; event.setSourceType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; event.setMessage(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; event.setDate(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue;
/** * <p> * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * </p> * * @param sourceType * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * @see SourceType */ public void setSourceType(SourceType sourceType) { withSourceType(sourceType); }
/** * <p> * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * </p> * * @param sourceType * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * @return Returns a reference to this object so that method calls can be chained together. * @see SourceType */ public Event withSourceType(String sourceType) { setSourceType(sourceType); return this; }
/** * <p> * The identifier for the source of the event. For example, if the event occurred at the cluster level, the * identifier would be the name of the cluster. * </p> * * @param sourceIdentifier * The identifier for the source of the event. For example, if the event occurred at the cluster level, the * identifier would be the name of the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withSourceIdentifier(String sourceIdentifier) { setSourceIdentifier(sourceIdentifier); return this; }
public Event unmarshall(StaxUnmarshallerContext context) throws Exception { Event event = new Event(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; event.setSourceIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; event.setSourceType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; event.setMessage(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; event.setDate(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue;
/** * <p> * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * </p> * * @param sourceType * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * @see SourceType */ public void setSourceType(SourceType sourceType) { withSourceType(sourceType); }
/** * <p> * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * </p> * * @param sourceType * Specifies the origin of this event - a cluster, a parameter group, a security group, etc. * @return Returns a reference to this object so that method calls can be chained together. * @see SourceType */ public Event withSourceType(String sourceType) { setSourceType(sourceType); return this; }
/** * <p> * The identifier for the source of the event. For example, if the event occurred at the cluster level, the * identifier would be the name of the cluster. * </p> * * @param sourceIdentifier * The identifier for the source of the event. For example, if the event occurred at the cluster level, the * identifier would be the name of the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withSourceIdentifier(String sourceIdentifier) { setSourceIdentifier(sourceIdentifier); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Event == false) return false; Event other = (Event) obj; if (other.getSourceIdentifier() == null ^ this.getSourceIdentifier() == null) return false; if (other.getSourceIdentifier() != null && other.getSourceIdentifier().equals(this.getSourceIdentifier()) == false) return false; if (other.getSourceType() == null ^ this.getSourceType() == null) return false; if (other.getSourceType() != null && other.getSourceType().equals(this.getSourceType()) == 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.getDate() == null ^ this.getDate() == null) return false; if (other.getDate() != null && other.getDate().equals(this.getDate()) == false) return false; return true; }
/** * <p> * The date and time when the event occurred. * </p> * * @param date * The date and time when the event occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withDate(java.util.Date date) { setDate(date); return this; }
/** * <p> * The text of the event. * </p> * * @param message * The text of the event. * @return Returns a reference to this object so that method calls can be chained together. */ public Event withMessage(String message) { setMessage(message); 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 (getSourceIdentifier() != null) sb.append("SourceIdentifier: ").append(getSourceIdentifier()).append(","); if (getSourceType() != null) sb.append("SourceType: ").append(getSourceType()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()).append(","); if (getDate() != null) sb.append("Date: ").append(getDate()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSourceIdentifier() == null) ? 0 : getSourceIdentifier().hashCode()); hashCode = prime * hashCode + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getDate() == null) ? 0 : getDate().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Event == false) return false; Event other = (Event) obj; if (other.getSourceIdentifier() == null ^ this.getSourceIdentifier() == null) return false; if (other.getSourceIdentifier() != null && other.getSourceIdentifier().equals(this.getSourceIdentifier()) == false) return false; if (other.getSourceType() == null ^ this.getSourceType() == null) return false; if (other.getSourceType() != null && other.getSourceType().equals(this.getSourceType()) == 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.getDate() == null ^ this.getDate() == null) return false; if (other.getDate() != null && other.getDate().equals(this.getDate()) == 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 (getSourceIdentifier() != null) sb.append("SourceIdentifier: ").append(getSourceIdentifier()).append(","); if (getSourceType() != null) sb.append("SourceType: ").append(getSourceType()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()).append(","); if (getDate() != null) sb.append("Date: ").append(getDate()); sb.append("}"); return sb.toString(); }