/** * <p> * The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more * results to return. * </p> * * @param nextToken * The token to use to retrieve the next page of results. This value is <code>null</code> when there are no * more results to return. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSecurityGroupsResult withNextToken(String nextToken) { setNextToken(nextToken); return this; }
public DescribeSecurityGroupsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeSecurityGroupsResult describeSecurityGroupsResult = new DescribeSecurityGroupsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeSecurityGroupsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("securityGroupInfo", targetDepth)) { describeSecurityGroupsResult.withSecurityGroups(new ArrayList<SecurityGroup>()); continue; } if (context.testExpression("securityGroupInfo/item", targetDepth)) { describeSecurityGroupsResult.withSecurityGroups(SecurityGroupStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("nextToken", targetDepth)) { describeSecurityGroupsResult.setNextToken(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeSecurityGroupsResult; } } } }
/** * <p> * The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more * results to return. * </p> * * @param nextToken * The token to use to retrieve the next page of results. This value is <code>null</code> when there are no * more results to return. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSecurityGroupsResult withNextToken(String nextToken) { setNextToken(nextToken); return this; }
public DescribeSecurityGroupsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeSecurityGroupsResult describeSecurityGroupsResult = new DescribeSecurityGroupsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeSecurityGroupsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("securityGroupInfo", targetDepth)) { describeSecurityGroupsResult.withSecurityGroups(new ArrayList<SecurityGroup>()); continue; } if (context.testExpression("securityGroupInfo/item", targetDepth)) { describeSecurityGroupsResult.withSecurityGroups(SecurityGroupStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("nextToken", targetDepth)) { describeSecurityGroupsResult.setNextToken(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeSecurityGroupsResult; } } } }