@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; }
/** * <p> * The IP address of the Amazon Route 53 health checker that provided the failure reason in * <code>StatusReport</code>. * </p> * * @param iPAddress * The IP address of the Amazon Route 53 health checker that provided the failure reason in * <code>StatusReport</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public HealthCheckObservation withIPAddress(String iPAddress) { setIPAddress(iPAddress); return this; }
/** * <p> * The region of the Amazon Route 53 health checker that provided the status in <code>StatusReport</code>. * </p> * * @param region * The region of the Amazon Route 53 health checker that provided the status in <code>StatusReport</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see HealthCheckRegion */ public HealthCheckObservation withRegion(String region) { setRegion(region); return this; }
public HealthCheckObservation unmarshall(StaxUnmarshallerContext context) throws Exception { HealthCheckObservation healthCheckObservation = new HealthCheckObservation(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return healthCheckObservation; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Region", targetDepth)) { healthCheckObservation.setRegion(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("IPAddress", targetDepth)) { healthCheckObservation.setIPAddress(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("StatusReport", targetDepth)) { healthCheckObservation.setStatusReport(StatusReportStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return healthCheckObservation; } } } }
/** * <p> * The region of the Amazon Route 53 health checker that provided the status in <code>StatusReport</code>. * </p> * * @param region * The region of the Amazon Route 53 health checker that provided the status in <code>StatusReport</code>. * @see HealthCheckRegion */ public void setRegion(HealthCheckRegion region) { withRegion(region); }
/** * <p> * A complex type that contains the last failure reason as reported by one Amazon Route 53 health checker and the * time of the failed health check. * </p> * * @param statusReport * A complex type that contains the last failure reason as reported by one Amazon Route 53 health checker and * the time of the failed health check. * @return Returns a reference to this object so that method calls can be chained together. */ public HealthCheckObservation withStatusReport(StatusReport statusReport) { setStatusReport(statusReport); return this; }
@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; }
/** * 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 (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getIPAddress() != null) sb.append("IPAddress: ").append(getIPAddress()).append(","); if (getStatusReport() != null) sb.append("StatusReport: ").append(getStatusReport()); sb.append("}"); return sb.toString(); }