public ChangeBatchRecord unmarshall(StaxUnmarshallerContext context) throws Exception { ChangeBatchRecord changeBatchRecord = new ChangeBatchRecord(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return changeBatchRecord; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Id", targetDepth)) { changeBatchRecord.setId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("SubmittedAt", targetDepth)) { changeBatchRecord.setSubmittedAt(DateStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Status", targetDepth)) { changeBatchRecord.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Comment", targetDepth)) { changeBatchRecord.setComment(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Submitter", targetDepth)) { changeBatchRecord.setSubmitter(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Changes/Change", targetDepth)) { changeBatchRecord.withChanges(ChangeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return changeBatchRecord; } } } }
public DescribeChangeSetResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeChangeSetResult describeChangeSetResult = new DescribeChangeSetResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeChangeSetResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("ChangeSetName", targetDepth)) { describeChangeSetResult.setChangeSetName( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ChangeSetId", targetDepth)) { describeChangeSetResult.setChangeSetId( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("StackId", targetDepth)) { describeChangeSetResult.setStackId( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("StackName", targetDepth)) { describeChangeSetResult.setStackName( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Description", targetDepth)) { describeChangeSetResult.setDescription( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Parameters/member", targetDepth)) { describeChangeSetResult.withParameters( ParameterStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("CreationTime", targetDepth)) { describeChangeSetResult.setCreationTime( DateStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ExecutionStatus", targetDepth)) { describeChangeSetResult.setExecutionStatus( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Status", targetDepth)) { describeChangeSetResult.setStatus( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("StatusReason", targetDepth)) { describeChangeSetResult.setStatusReason( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("NotificationARNs/member", targetDepth)) { describeChangeSetResult.withNotificationARNs( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Capabilities/member", targetDepth)) { describeChangeSetResult.withCapabilities( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Tags/member", targetDepth)) { describeChangeSetResult.withTags(TagStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Changes/member", targetDepth)) { describeChangeSetResult.withChanges( ChangeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("NextToken", targetDepth)) { describeChangeSetResult.setNextToken( StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeChangeSetResult; } } } }