/** * <p> * A structure containing details about the new policy version. * </p> * * @param policyVersion * A structure containing details about the new policy version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePolicyVersionResult withPolicyVersion(PolicyVersion policyVersion) { setPolicyVersion(policyVersion); return this; }
public CreatePolicyVersionResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreatePolicyVersionResult createPolicyVersionResult = new CreatePolicyVersionResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createPolicyVersionResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("PolicyVersion", targetDepth)) { createPolicyVersionResult.setPolicyVersion(PolicyVersionStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createPolicyVersionResult; } } } }
/** * <p> * A structure containing details about the new policy version. * </p> * * @param policyVersion * A structure containing details about the new policy version. * @return Returns a reference to this object so that method calls can be chained together. */ public CreatePolicyVersionResult withPolicyVersion(PolicyVersion policyVersion) { setPolicyVersion(policyVersion); return this; }
public CreatePolicyVersionResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreatePolicyVersionResult createPolicyVersionResult = new CreatePolicyVersionResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createPolicyVersionResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("PolicyVersion", targetDepth)) { createPolicyVersionResult.setPolicyVersion(PolicyVersionStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createPolicyVersionResult; } } } }