/** * <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; }
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; } } } }