@Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

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

    if (other.getReservedInstancesId() == null ^ this.getReservedInstancesId() == null)
      return false;
    if (other.getReservedInstancesId() != null
        && other.getReservedInstancesId().equals(this.getReservedInstancesId()) == false)
      return false;
    return true;
  }
  public ReservedInstancesId unmarshall(StaxUnmarshallerContext context) throws Exception {
    ReservedInstancesId reservedInstancesId = new ReservedInstancesId();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

    while (true) {
      int xmlEvent = context.nextEvent();
      if (xmlEvent == XmlPullParser.END_DOCUMENT) return reservedInstancesId;

      if (xmlEvent == XmlPullParser.START_TAG) {
        if (context.testExpression("reservedInstancesId", targetDepth)) {
          reservedInstancesId.setReservedInstancesId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent == XmlPullParser.END_TAG) {
        if (context.getCurrentDepth() < originalDepth) {
          return reservedInstancesId;
        }
      }
    }
  }