public GetPasswordDataResult unmarshall(StaxUnmarshallerContext context) throws Exception {
    GetPasswordDataResult getPasswordDataResult = new GetPasswordDataResult();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    if (context.isStartOfDocument()) targetDepth += 1;

    while (true) {
      XMLEvent xmlEvent = context.nextEvent();
      if (xmlEvent.isEndDocument()) return getPasswordDataResult;

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("instanceId", targetDepth)) {
          getPasswordDataResult.setInstanceId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("timestamp", targetDepth)) {
          getPasswordDataResult.setTimestamp(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("passwordData", targetDepth)) {
          getPasswordDataResult.setPasswordData(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return getPasswordDataResult;
        }
      }
    }
  }
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

    if (obj instanceof GetPasswordDataResult == false) return false;
    GetPasswordDataResult other = (GetPasswordDataResult) obj;

    if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false;
    if (other.getInstanceId() != null
        && other.getInstanceId().equals(this.getInstanceId()) == false) return false;
    if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false;
    if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false)
      return false;
    if (other.getPasswordData() == null ^ this.getPasswordData() == null) return false;
    if (other.getPasswordData() != null
        && other.getPasswordData().equals(this.getPasswordData()) == false) return false;
    return true;
  }