/** * <p> * The current value for the limit that is specified by <code>Type</code>. * </p> * * @param value * The current value for the limit that is specified by <code>Type</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public HostedZoneLimit withValue(Long value) { setValue(value); return this; }
public HostedZoneLimit unmarshall(StaxUnmarshallerContext context) throws Exception { HostedZoneLimit hostedZoneLimit = new HostedZoneLimit(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return hostedZoneLimit; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Type", targetDepth)) { hostedZoneLimit.setType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Value", targetDepth)) { hostedZoneLimit.setValue(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return hostedZoneLimit; } } } }