/** * <p> * A structure containing details about the new instance profile. * </p> * * @param instanceProfile * A structure containing details about the new instance profile. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstanceProfileResult withInstanceProfile(InstanceProfile instanceProfile) { setInstanceProfile(instanceProfile); return this; }
public CreateInstanceProfileResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateInstanceProfileResult createInstanceProfileResult = new CreateInstanceProfileResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createInstanceProfileResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("InstanceProfile", targetDepth)) { createInstanceProfileResult.setInstanceProfile(InstanceProfileStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createInstanceProfileResult; } } } }
/** * <p> * A structure containing details about the new instance profile. * </p> * * @param instanceProfile * A structure containing details about the new instance profile. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInstanceProfileResult withInstanceProfile(InstanceProfile instanceProfile) { setInstanceProfile(instanceProfile); return this; }
public CreateInstanceProfileResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateInstanceProfileResult createInstanceProfileResult = new CreateInstanceProfileResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createInstanceProfileResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("InstanceProfile", targetDepth)) { createInstanceProfileResult.setInstanceProfile(InstanceProfileStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createInstanceProfileResult; } } } }