/** * <p> * Parameters used to automatically set up EBS volumes when the instance is launched. * </p> * * @param ebs * Parameters used to automatically set up EBS volumes when the instance is launched. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceBlockDeviceMapping withEbs(EbsInstanceBlockDevice ebs) { setEbs(ebs); return this; }
public InstanceBlockDeviceMapping unmarshall(StaxUnmarshallerContext context) throws Exception { InstanceBlockDeviceMapping instanceBlockDeviceMapping = new InstanceBlockDeviceMapping(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return instanceBlockDeviceMapping; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("deviceName", targetDepth)) { instanceBlockDeviceMapping.setDeviceName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ebs", targetDepth)) { instanceBlockDeviceMapping.setEbs(EbsInstanceBlockDeviceStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return instanceBlockDeviceMapping; } } } }
/** * <p> * Parameters used to automatically set up EBS volumes when the instance is launched. * </p> * * @param ebs * Parameters used to automatically set up EBS volumes when the instance is launched. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceBlockDeviceMapping withEbs(EbsInstanceBlockDevice ebs) { setEbs(ebs); return this; }
public InstanceBlockDeviceMapping unmarshall(StaxUnmarshallerContext context) throws Exception { InstanceBlockDeviceMapping instanceBlockDeviceMapping = new InstanceBlockDeviceMapping(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return instanceBlockDeviceMapping; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("deviceName", targetDepth)) { instanceBlockDeviceMapping.setDeviceName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ebs", targetDepth)) { instanceBlockDeviceMapping.setEbs(EbsInstanceBlockDeviceStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return instanceBlockDeviceMapping; } } } }
public InstanceBlockDeviceMapping unmarshall(StaxUnmarshallerContext context) throws Exception { InstanceBlockDeviceMapping instanceBlockDeviceMapping = new InstanceBlockDeviceMapping(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return instanceBlockDeviceMapping; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("deviceName", targetDepth)) { instanceBlockDeviceMapping.setDeviceName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ebs", targetDepth)) { instanceBlockDeviceMapping.setEbs(EbsInstanceBlockDeviceStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return instanceBlockDeviceMapping; } } } }