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