/** * <p> * Provides an identifier to allow retrieval of paginated results. * </p> * * @param marker * Provides an identifier to allow retrieval of paginated results. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeCacheClustersResult withMarker(String marker) { setMarker(marker); return this; }
public DescribeCacheClustersResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeCacheClustersResult describeCacheClustersResult = new DescribeCacheClustersResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeCacheClustersResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeCacheClustersResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("CacheClusters", targetDepth)) { describeCacheClustersResult.withCacheClusters(new ArrayList<CacheCluster>()); continue; } if (context.testExpression("CacheClusters/CacheCluster", targetDepth)) { describeCacheClustersResult.withCacheClusters(CacheClusterStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeCacheClustersResult; } } } }
/** * <p> * Provides an identifier to allow retrieval of paginated results. * </p> * * @param marker * Provides an identifier to allow retrieval of paginated results. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeCacheClustersResult withMarker(String marker) { setMarker(marker); return this; }
public DescribeCacheClustersResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeCacheClustersResult describeCacheClustersResult = new DescribeCacheClustersResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeCacheClustersResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Marker", targetDepth)) { describeCacheClustersResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("CacheClusters", targetDepth)) { describeCacheClustersResult.withCacheClusters(new ArrayList<CacheCluster>()); continue; } if (context.testExpression("CacheClusters/CacheCluster", targetDepth)) { describeCacheClustersResult.withCacheClusters(CacheClusterStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeCacheClustersResult; } } } }