/** * <p> * A structure that contains details about the account's password policy. * </p> * * @param passwordPolicy * A structure that contains details about the account's password policy. * @return Returns a reference to this object so that method calls can be chained together. */ public GetAccountPasswordPolicyResult withPasswordPolicy(PasswordPolicy passwordPolicy) { setPasswordPolicy(passwordPolicy); return this; }
public GetAccountPasswordPolicyResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetAccountPasswordPolicyResult getAccountPasswordPolicyResult = new GetAccountPasswordPolicyResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getAccountPasswordPolicyResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("PasswordPolicy", targetDepth)) { getAccountPasswordPolicyResult.setPasswordPolicy(PasswordPolicyStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getAccountPasswordPolicyResult; } } } }
/** * <p> * A structure that contains details about the account's password policy. * </p> * * @param passwordPolicy * A structure that contains details about the account's password policy. * @return Returns a reference to this object so that method calls can be chained together. */ public GetAccountPasswordPolicyResult withPasswordPolicy(PasswordPolicy passwordPolicy) { setPasswordPolicy(passwordPolicy); return this; }
public GetAccountPasswordPolicyResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetAccountPasswordPolicyResult getAccountPasswordPolicyResult = new GetAccountPasswordPolicyResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getAccountPasswordPolicyResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("PasswordPolicy", targetDepth)) { getAccountPasswordPolicyResult.setPasswordPolicy(PasswordPolicyStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getAccountPasswordPolicyResult; } } } }