@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getCheckedTime() == null) ? 0 : getCheckedTime().hashCode()); return hashCode; }
/** * <p> * The date and time that the health checker performed the health check in <a * href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601 format</a> and Coordinated Universal Time (UTC). For * example, the value <code>2017-03-27T17:48:16.751Z</code> represents March 27, 2017 at 17:48:16.751 UTC. * </p> * * @param checkedTime * The date and time that the health checker performed the health check in <a * href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601 format</a> and Coordinated Universal Time (UTC). * For example, the value <code>2017-03-27T17:48:16.751Z</code> represents March 27, 2017 at 17:48:16.751 * UTC. * @return Returns a reference to this object so that method calls can be chained together. */ public StatusReport withCheckedTime(java.util.Date checkedTime) { setCheckedTime(checkedTime); return this; }
/** * <p> * A description of the status of the health check endpoint as reported by one of the Amazon Route 53 health * checkers. * </p> * * @param status * A description of the status of the health check endpoint as reported by one of the Amazon Route 53 health * checkers. * @return Returns a reference to this object so that method calls can be chained together. */ public StatusReport withStatus(String status) { setStatus(status); return this; }
public StatusReport unmarshall(StaxUnmarshallerContext context) throws Exception { StatusReport statusReport = new StatusReport(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return statusReport; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Status", targetDepth)) { statusReport.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("CheckedTime", targetDepth)) { statusReport.setCheckedTime(DateStaxUnmarshallerFactory.getInstance("iso8601").unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return statusReport; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getIPAddress() == null) ? 0 : getIPAddress().hashCode()); hashCode = prime * hashCode + ((getStatusReport() == null) ? 0 : getStatusReport().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HealthCheckObservation == false) return false; HealthCheckObservation other = (HealthCheckObservation) obj; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getIPAddress() == null ^ this.getIPAddress() == null) return false; if (other.getIPAddress() != null && other.getIPAddress().equals(this.getIPAddress()) == false) return false; if (other.getStatusReport() == null ^ this.getStatusReport() == null) return false; if (other.getStatusReport() != null && other.getStatusReport().equals(this.getStatusReport()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StatusReport == false) return false; StatusReport other = (StatusReport) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getCheckedTime() == null ^ this.getCheckedTime() == null) return false; if (other.getCheckedTime() != null && other.getCheckedTime().equals(this.getCheckedTime()) == 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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getCheckedTime() != null) sb.append("CheckedTime: ").append(getCheckedTime()); sb.append("}"); return sb.toString(); }