public PendingModifiedValues unmarshall(StaxUnmarshallerContext context) throws Exception { PendingModifiedValues pendingModifiedValues = new PendingModifiedValues(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return pendingModifiedValues; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("MasterUserPassword", targetDepth)) { pendingModifiedValues.setMasterUserPassword( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("NodeType", targetDepth)) { pendingModifiedValues.setNodeType( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("NumberOfNodes", targetDepth)) { pendingModifiedValues.setNumberOfNodes( IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ClusterType", targetDepth)) { pendingModifiedValues.setClusterType( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ClusterVersion", targetDepth)) { pendingModifiedValues.setClusterVersion( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("AutomatedSnapshotRetentionPeriod", targetDepth)) { pendingModifiedValues.setAutomatedSnapshotRetentionPeriod( IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ClusterIdentifier", targetDepth)) { pendingModifiedValues.setClusterIdentifier( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return pendingModifiedValues; } } } }