/** * <p> * A value that indicates whether this is a private hosted zone. * </p> * * @param privateZone * A value that indicates whether this is a private hosted zone. * @return Returns a reference to this object so that method calls can be chained together. */ public HostedZoneConfig withPrivateZone(Boolean privateZone) { setPrivateZone(privateZone); return this; }
public HostedZoneConfig unmarshall(StaxUnmarshallerContext context) throws Exception { HostedZoneConfig hostedZoneConfig = new HostedZoneConfig(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return hostedZoneConfig; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Comment", targetDepth)) { hostedZoneConfig.setComment(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("PrivateZone", targetDepth)) { hostedZoneConfig.setPrivateZone(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return hostedZoneConfig; } } } }