public CreateCloudFrontOriginAccessIdentityResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateCloudFrontOriginAccessIdentityResult createCloudFrontOriginAccessIdentityResult = new CreateCloudFrontOriginAccessIdentityResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) { createCloudFrontOriginAccessIdentityResult.setLocation(context.getHeader("Location")); createCloudFrontOriginAccessIdentityResult.setETag(context.getHeader("ETag")); } while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createCloudFrontOriginAccessIdentityResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("CloudFrontOriginAccessIdentity", targetDepth)) { createCloudFrontOriginAccessIdentityResult.setCloudFrontOriginAccessIdentity( CloudFrontOriginAccessIdentityStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createCloudFrontOriginAccessIdentityResult; } } } }
public GetDistributionConfigResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetDistributionConfigResult getDistributionConfigResult = new GetDistributionConfigResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) { getDistributionConfigResult.setETag(context.getHeader("ETag")); } while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getDistributionConfigResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("DistributionConfig", targetDepth)) { getDistributionConfigResult.setDistributionConfig( DistributionConfigStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getDistributionConfigResult; } } } }