/** * <p> * The ID of the Convertible Reserved Instance offering. * </p> * * @param offeringId * The ID of the Convertible Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetConfiguration withOfferingId(String offeringId) { setOfferingId(offeringId); return this; }
public TargetConfiguration unmarshall(StaxUnmarshallerContext context) throws Exception { TargetConfiguration targetConfiguration = new TargetConfiguration(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return targetConfiguration; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("instanceCount", targetDepth)) { targetConfiguration.setInstanceCount(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("offeringId", targetDepth)) { targetConfiguration.setOfferingId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return targetConfiguration; } } } }
/** * <p> * The ID of the Convertible Reserved Instance offering. * </p> * * @param offeringId * The ID of the Convertible Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetConfiguration withOfferingId(String offeringId) { setOfferingId(offeringId); return this; }
public TargetConfiguration unmarshall(StaxUnmarshallerContext context) throws Exception { TargetConfiguration targetConfiguration = new TargetConfiguration(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return targetConfiguration; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("instanceCount", targetDepth)) { targetConfiguration.setInstanceCount(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("offeringId", targetDepth)) { targetConfiguration.setOfferingId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return targetConfiguration; } } } }