/** * <p> * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>. * </p> * * @param attribute * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceAttribute */ public ResourceTargetDefinition withAttribute(String attribute) { setAttribute(attribute); return this; }
public ResourceTargetDefinition unmarshall(StaxUnmarshallerContext context) throws Exception { ResourceTargetDefinition resourceTargetDefinition = new ResourceTargetDefinition(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return resourceTargetDefinition; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Attribute", targetDepth)) { resourceTargetDefinition.setAttribute(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Name", targetDepth)) { resourceTargetDefinition.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("RequiresRecreation", targetDepth)) { resourceTargetDefinition.setRequiresRecreation(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return resourceTargetDefinition; } } } }
/** * <p> * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>. * </p> * * @param attribute * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * <code>Metadata</code>, <code>Properties</code>, or <code>Tags</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceAttribute */ public ResourceTargetDefinition withAttribute(String attribute) { setAttribute(attribute); return this; }
public ResourceTargetDefinition unmarshall(StaxUnmarshallerContext context) throws Exception { ResourceTargetDefinition resourceTargetDefinition = new ResourceTargetDefinition(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return resourceTargetDefinition; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Attribute", targetDepth)) { resourceTargetDefinition.setAttribute(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Name", targetDepth)) { resourceTargetDefinition.setName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("RequiresRecreation", targetDepth)) { resourceTargetDefinition.setRequiresRecreation(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return resourceTargetDefinition; } } } }