/** * <p> * The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved * and cannot be specified in a request * </p> * * @param instanceCount * The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is * reserved and cannot be specified in a request * @return Returns a reference to this object so that method calls can be chained together. */ public TargetConfiguration withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); 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 number of instances the Convertible Reserved Instance offering can be applied to. This parameter is reserved * and cannot be specified in a request * </p> * * @param instanceCount * The number of instances the Convertible Reserved Instance offering can be applied to. This parameter is * reserved and cannot be specified in a request * @return Returns a reference to this object so that method calls can be chained together. */ public TargetConfiguration withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); 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; } } } }