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