public GetHostedZoneCountResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetHostedZoneCountResult getHostedZoneCountResult = new GetHostedZoneCountResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getHostedZoneCountResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("HostedZoneCount", targetDepth)) { getHostedZoneCountResult.setHostedZoneCount(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getHostedZoneCountResult; } } } }
public DiskImageVolumeDescription unmarshall(StaxUnmarshallerContext context) throws Exception { DiskImageVolumeDescription diskImageVolumeDescription = new DiskImageVolumeDescription(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return diskImageVolumeDescription; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("size", targetDepth)) { diskImageVolumeDescription.setSize(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("id", targetDepth)) { diskImageVolumeDescription.setId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return diskImageVolumeDescription; } } } }
@Test public void testLongStaxUnmarshaller() throws Exception { Long data = new Long(1000L); SimpleTypeStaxUnmarshallers.LongStaxUnmarshaller unmarshaller = SimpleTypeStaxUnmarshallers.LongStaxUnmarshaller .getInstance(); Long unmarshalled = unmarshaller.unmarshall(getContext(data.toString())); assertEquals(unmarshalled, Long.valueOf(1000L)); }
/** * Constructor. * @return the instance. */ public static LongStaxUnmarshaller getInstance() { if (instance == null) instance = new LongStaxUnmarshaller(); return instance; } }
/** * Constructor. * @return the instance. */ public static LongStaxUnmarshaller getInstance() { if (instance == null) instance = new LongStaxUnmarshaller(); return instance; } }
/** * Constructor. * @return the instance. */ public static LongStaxUnmarshaller getInstance() { if (instance == null) instance = new LongStaxUnmarshaller(); return instance; } }
public LBCookieStickinessPolicy unmarshall(StaxUnmarshallerContext context) throws Exception { LBCookieStickinessPolicy lBCookieStickinessPolicy = new LBCookieStickinessPolicy(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("PolicyName", targetDepth)) { lBCookieStickinessPolicy.setPolicyName(StringStaxUnmarshaller.getInstance() .unmarshall(context)); continue; } if (context.testExpression("CookieExpirationPeriod", targetDepth)) { lBCookieStickinessPolicy.setCookieExpirationPeriod(LongStaxUnmarshaller .getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return lBCookieStickinessPolicy; }
public VolumeDetail unmarshall(StaxUnmarshallerContext context) throws Exception { VolumeDetail volumeDetail = new VolumeDetail(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return volumeDetail; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("size", targetDepth)) { volumeDetail.setSize(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return volumeDetail; } } } }
public PriceSchedule unmarshall(StaxUnmarshallerContext context) throws Exception { PriceSchedule priceSchedule = new PriceSchedule(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return priceSchedule; if (context.testExpression("term", targetDepth)) { priceSchedule.setTerm(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("currencyCode", targetDepth)) { priceSchedule.setCurrencyCode(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("active", targetDepth)) { priceSchedule.setActive(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public GetHealthCheckCountResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetHealthCheckCountResult getHealthCheckCountResult = new GetHealthCheckCountResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getHealthCheckCountResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("HealthCheckCount", targetDepth)) { getHealthCheckCountResult.setHealthCheckCount(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getHealthCheckCountResult; } } } }
public DiskImageDescription unmarshall(StaxUnmarshallerContext context) throws Exception { DiskImageDescription diskImageDescription = new DiskImageDescription(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return diskImageDescription; if (context.testExpression("format", targetDepth)) { diskImageDescription.setFormat(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("size", targetDepth)) { diskImageDescription.setSize(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("importManifestUrl", targetDepth)) { diskImageDescription.setImportManifestUrl(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public ReusableDelegationSetLimit unmarshall(StaxUnmarshallerContext context) throws Exception { ReusableDelegationSetLimit reusableDelegationSetLimit = new ReusableDelegationSetLimit(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return reusableDelegationSetLimit; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Type", targetDepth)) { reusableDelegationSetLimit.setType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Value", targetDepth)) { reusableDelegationSetLimit.setValue(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return reusableDelegationSetLimit; } } } }
public ImportVolumeTaskDetails unmarshall(StaxUnmarshallerContext context) throws Exception { ImportVolumeTaskDetails importVolumeTaskDetails = new ImportVolumeTaskDetails(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return importVolumeTaskDetails; if (context.testExpression("bytesConverted", targetDepth)) { importVolumeTaskDetails.setBytesConverted(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("availabilityZone", targetDepth)) { importVolumeTaskDetails.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("description", targetDepth)) { importVolumeTaskDetails.setDescription(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public AccountLimit unmarshall(StaxUnmarshallerContext context) throws Exception { AccountLimit accountLimit = new AccountLimit(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return accountLimit; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Type", targetDepth)) { accountLimit.setType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Value", targetDepth)) { accountLimit.setValue(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return accountLimit; } } } }
public SendDataPoint unmarshall(StaxUnmarshallerContext context) throws Exception { SendDataPoint sendDataPoint = new SendDataPoint(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; if (context.testExpression("DeliveryAttempts", targetDepth)) { sendDataPoint.setDeliveryAttempts(LongStaxUnmarshaller.getInstance() .unmarshall(context)); continue; if (context.testExpression("Bounces", targetDepth)) { sendDataPoint .setBounces(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("Complaints", targetDepth)) { sendDataPoint.setComplaints(LongStaxUnmarshaller.getInstance().unmarshall( context)); continue; if (context.testExpression("Rejects", targetDepth)) { sendDataPoint .setRejects(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public HostedZoneLimit unmarshall(StaxUnmarshallerContext context) throws Exception { HostedZoneLimit hostedZoneLimit = new HostedZoneLimit(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return hostedZoneLimit; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Type", targetDepth)) { hostedZoneLimit.setType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Value", targetDepth)) { hostedZoneLimit.setValue(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return hostedZoneLimit; } } } }
public ImportInstanceVolumeDetailItem unmarshall(StaxUnmarshallerContext context) throws Exception { ImportInstanceVolumeDetailItem importInstanceVolumeDetailItem = new ImportInstanceVolumeDetailItem(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return importInstanceVolumeDetailItem; if (context.testExpression("bytesConverted", targetDepth)) { importInstanceVolumeDetailItem.setBytesConverted(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("availabilityZone", targetDepth)) { importInstanceVolumeDetailItem.setAvailabilityZone(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("status", targetDepth)) { importInstanceVolumeDetailItem.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public LBCookieStickinessPolicy unmarshall(StaxUnmarshallerContext context) throws Exception { LBCookieStickinessPolicy lBCookieStickinessPolicy = new LBCookieStickinessPolicy(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return lBCookieStickinessPolicy; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("PolicyName", targetDepth)) { lBCookieStickinessPolicy.setPolicyName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("CookieExpirationPeriod", targetDepth)) { lBCookieStickinessPolicy.setCookieExpirationPeriod(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return lBCookieStickinessPolicy; } } } }
public DomainMetadataResult unmarshall(StaxUnmarshallerContext context) throws Exception { DomainMetadataResult domainMetadataResult = new DomainMetadataResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return domainMetadataResult; if (context.testExpression("ItemNamesSizeBytes", targetDepth)) { domainMetadataResult.setItemNamesSizeBytes(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("AttributeNamesSizeBytes", targetDepth)) { domainMetadataResult.setAttributeNamesSizeBytes(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; if (context.testExpression("AttributeValuesSizeBytes", targetDepth)) { domainMetadataResult.setAttributeValuesSizeBytes(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public DiskImageVolumeDescription unmarshall(StaxUnmarshallerContext context) throws Exception { DiskImageVolumeDescription diskImageVolumeDescription = new DiskImageVolumeDescription(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return diskImageVolumeDescription; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("id", targetDepth)) { diskImageVolumeDescription.setId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("size", targetDepth)) { diskImageVolumeDescription.setSize(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return diskImageVolumeDescription; } } } }