/** * <p> * A complex type that contains identifying information about the health check. * </p> * * @param healthCheck * A complex type that contains identifying information about the health check. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateHealthCheckResult withHealthCheck(HealthCheck healthCheck) { setHealthCheck(healthCheck); return this; }
public CreateHealthCheckResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateHealthCheckResult createHealthCheckResult = new CreateHealthCheckResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; if (context.isStartOfDocument()) { context.setCurrentHeader("Location"); createHealthCheckResult.setLocation(StringStaxUnmarshaller.getInstance().unmarshall(context)); } while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createHealthCheckResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("HealthCheck", targetDepth)) { createHealthCheckResult.setHealthCheck(HealthCheckStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createHealthCheckResult; } } } }