public CreateVpnConnectionResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateVpnConnectionResult createVpnConnectionResult = new CreateVpnConnectionResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createVpnConnectionResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("vpnConnection", targetDepth)) { createVpnConnectionResult.setVpnConnection( VpnConnectionStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createVpnConnectionResult; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateVpnConnectionResult == false) return false; CreateVpnConnectionResult other = (CreateVpnConnectionResult) obj; if (other.getVpnConnection() == null ^ this.getVpnConnection() == null) return false; if (other.getVpnConnection() != null && other.getVpnConnection().equals(this.getVpnConnection()) == false) return false; return true; }