/** * <p> * The ID of the association. * </p> * * @param association * The ID of the association. * @return Returns a reference to this object so that method calls can be chained together. */ public AssociateTransitGatewayRouteTableResult withAssociation(TransitGatewayAssociation association) { setAssociation(association); return this; }
public AssociateTransitGatewayRouteTableResult unmarshall(StaxUnmarshallerContext context) throws Exception { AssociateTransitGatewayRouteTableResult associateTransitGatewayRouteTableResult = new AssociateTransitGatewayRouteTableResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return associateTransitGatewayRouteTableResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("association", targetDepth)) { associateTransitGatewayRouteTableResult.setAssociation(TransitGatewayAssociationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return associateTransitGatewayRouteTableResult; } } } }
/** * <p> * The ID of the association. * </p> * * @param association * The ID of the association. * @return Returns a reference to this object so that method calls can be chained together. */ public AssociateTransitGatewayRouteTableResult withAssociation(TransitGatewayAssociation association) { setAssociation(association); return this; }
public AssociateTransitGatewayRouteTableResult unmarshall(StaxUnmarshallerContext context) throws Exception { AssociateTransitGatewayRouteTableResult associateTransitGatewayRouteTableResult = new AssociateTransitGatewayRouteTableResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return associateTransitGatewayRouteTableResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("association", targetDepth)) { associateTransitGatewayRouteTableResult.setAssociation(TransitGatewayAssociationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return associateTransitGatewayRouteTableResult; } } } }