/** * <p> * The type of entity that AWS CloudFormation changes. Currently, the only entity type is <code>Resource</code>. * </p> * * @param type * The type of entity that AWS CloudFormation changes. Currently, the only entity type is * <code>Resource</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see ChangeType */ public Change withType(String type) { setType(type); return this; }
public Change unmarshall(StaxUnmarshallerContext context) throws Exception { Change change = new Change(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return change; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Type", targetDepth)) { change.setType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ResourceChange", targetDepth)) { change.setResourceChange(ResourceChangeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return change; } } } }
/** * <p> * The type of entity that AWS CloudFormation changes. Currently, the only entity type is <code>Resource</code>. * </p> * * @param type * The type of entity that AWS CloudFormation changes. Currently, the only entity type is * <code>Resource</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see ChangeType */ public Change withType(String type) { setType(type); return this; }
public Change unmarshall(StaxUnmarshallerContext context) throws Exception { Change change = new Change(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return change; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Type", targetDepth)) { change.setType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("ResourceChange", targetDepth)) { change.setResourceChange(ResourceChangeStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return change; } } } }