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

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

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("QueueUrl", targetDepth)) {
          listDeadLetterSourceQueuesResult.withQueueUrls(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return listDeadLetterSourceQueuesResult;
        }
      }
    }
  }
  public ListDeadLetterSourceQueuesResult unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    ListDeadLetterSourceQueuesResult listDeadLetterSourceQueuesResult =
        new ListDeadLetterSourceQueuesResult();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent == XmlPullParser.START_TAG) {
        if (context.testExpression("QueueUrl", targetDepth)) {
          listDeadLetterSourceQueuesResult
              .getQueueUrls()
              .add(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent == XmlPullParser.END_TAG) {
        if (context.getCurrentDepth() < originalDepth) {
          return listDeadLetterSourceQueuesResult;
        }
      }
    }
  }
    @Override
    public Entry<String, MessageAttributeValue> unmarshall(StaxUnmarshallerContext context)
        throws Exception {
      int originalDepth = context.getCurrentDepth();
      int targetDepth = originalDepth + 1;

      MapEntry<String, MessageAttributeValue> entry = new MapEntry<String, MessageAttributeValue>();

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

        if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
          if (context.testExpression("Name", targetDepth)) {
            entry.setKey(StringStaxUnmarshaller.getInstance().unmarshall(context));
            continue;
          }
          if (context.testExpression("Value", targetDepth)) {
            entry.setValue(MessageAttributeValueStaxUnmarshaller.getInstance().unmarshall(context));
            continue;
          }
        } else if (xmlEvent.isEndElement()) {
          if (context.getCurrentDepth() < originalDepth) return entry;
        }
      }
    }
  public CreateQueueResult unmarshall(StaxUnmarshallerContext context) throws Exception {
    CreateQueueResult createQueueResult = new CreateQueueResult();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent == XmlPullParser.START_TAG) {
        if (context.testExpression("QueueUrl", targetDepth)) {
          createQueueResult.setQueueUrl(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent == XmlPullParser.END_TAG) {
        if (context.getCurrentDepth() < originalDepth) {
          break;
        }
      }
    }
    return createQueueResult;
  }
  public SendMessageBatchRequestEntry unmarshall(StaxUnmarshallerContext context) throws Exception {
    SendMessageBatchRequestEntry sendMessageBatchRequestEntry = new SendMessageBatchRequestEntry();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {

        if (context.testExpression("Id", targetDepth)) {
          sendMessageBatchRequestEntry.setId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("MessageBody", targetDepth)) {
          sendMessageBatchRequestEntry.setMessageBody(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DelaySeconds", targetDepth)) {
          sendMessageBatchRequestEntry.setDelaySeconds(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("MessageAttribute", targetDepth)) {
          Entry<String, MessageAttributeValue> entry =
              MessageAttributesMapEntryUnmarshaller.getInstance().unmarshall(context);
          sendMessageBatchRequestEntry.getMessageAttributes().put(entry.getKey(), entry.getValue());
          continue;
        }

      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return sendMessageBatchRequestEntry;
        }
      }
    }
  }
  public ChangeMessageVisibilityBatchRequestEntry unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    ChangeMessageVisibilityBatchRequestEntry changeMessageVisibilityBatchRequestEntry =
        new ChangeMessageVisibilityBatchRequestEntry();

    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent == XmlPullParser.START_TAG) {
        if (context.testExpression("Id", targetDepth)) {
          changeMessageVisibilityBatchRequestEntry.setId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ReceiptHandle", targetDepth)) {
          changeMessageVisibilityBatchRequestEntry.setReceiptHandle(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("VisibilityTimeout", targetDepth)) {
          changeMessageVisibilityBatchRequestEntry.setVisibilityTimeout(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent == XmlPullParser.END_TAG) {
        if (context.getCurrentDepth() < originalDepth) {
          break;
        }
      }
    }
    return changeMessageVisibilityBatchRequestEntry;
  }