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

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

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("Message", targetDepth)) {
          validationMessage.setMessage(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Severity", targetDepth)) {
          validationMessage.setSeverity(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Namespace", targetDepth)) {
          validationMessage.setNamespace(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("OptionName", targetDepth)) {
          validationMessage.setOptionName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return validationMessage;
        }
      }
    }
  }
  public ListAvailableSolutionStacksResult unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    ListAvailableSolutionStacksResult listAvailableSolutionStacksResult =
        new ListAvailableSolutionStacksResult();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("SolutionStacks/member", targetDepth)) {
          listAvailableSolutionStacksResult
              .getSolutionStacks()
              .add(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("SolutionStackDetails/member", targetDepth)) {
          listAvailableSolutionStacksResult
              .getSolutionStackDetails()
              .add(SolutionStackDescriptionStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return listAvailableSolutionStacksResult;
        }
      }
    }
  }
  public Listener unmarshall(StaxUnmarshallerContext context) throws Exception {
    Listener listener = new Listener();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

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

        if (context.testExpression("Protocol", targetDepth)) {
          listener.setProtocol(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Port", targetDepth)) {
          listener.setPort(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return listener;
        }
      }
    }
  }
  public EnvironmentResourceDescription unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    EnvironmentResourceDescription environmentResourceDescription =
        new EnvironmentResourceDescription();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("EnvironmentName", targetDepth)) {
          environmentResourceDescription.setEnvironmentName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("AutoScalingGroups/member", targetDepth)) {
          environmentResourceDescription
              .getAutoScalingGroups()
              .add(AutoScalingGroupStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Instances/member", targetDepth)) {
          environmentResourceDescription
              .getInstances()
              .add(InstanceStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("LaunchConfigurations/member", targetDepth)) {
          environmentResourceDescription
              .getLaunchConfigurations()
              .add(LaunchConfigurationStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("LoadBalancers/member", targetDepth)) {
          environmentResourceDescription
              .getLoadBalancers()
              .add(LoadBalancerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Triggers/member", targetDepth)) {
          environmentResourceDescription
              .getTriggers()
              .add(TriggerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return environmentResourceDescription;
        }
      }
    }
  }
  public Deployment unmarshall(StaxUnmarshallerContext context) throws Exception {
    Deployment deployment = new Deployment();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

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

        if (context.testExpression("VersionLabel", targetDepth)) {
          deployment.setVersionLabel(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DeploymentId", targetDepth)) {
          deployment.setDeploymentId(LongStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Status", targetDepth)) {
          deployment.setStatus(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DeploymentTime", targetDepth)) {
          deployment.setDeploymentTime(DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return deployment;
        }
      }
    }
  }
  public LoadBalancer unmarshall(StaxUnmarshallerContext context) throws Exception {
    LoadBalancer loadBalancer = new LoadBalancer();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("Name", targetDepth)) {
          loadBalancer.setName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return loadBalancer;
        }
      }
    }
  }
  public ConfigurationSettingsDescription unmarshall(StaxUnmarshallerContext context)
      throws Exception {
    ConfigurationSettingsDescription configurationSettingsDescription =
        new ConfigurationSettingsDescription();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

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

        if (context.testExpression("SolutionStackName", targetDepth)) {
          configurationSettingsDescription.setSolutionStackName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("ApplicationName", targetDepth)) {
          configurationSettingsDescription.setApplicationName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("TemplateName", targetDepth)) {
          configurationSettingsDescription.setTemplateName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Description", targetDepth)) {
          configurationSettingsDescription.setDescription(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("EnvironmentName", targetDepth)) {
          configurationSettingsDescription.setEnvironmentName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DeploymentStatus", targetDepth)) {
          configurationSettingsDescription.setDeploymentStatus(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DateCreated", targetDepth)) {
          configurationSettingsDescription.setDateCreated(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("DateUpdated", targetDepth)) {
          configurationSettingsDescription.setDateUpdated(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("OptionSettings/member", targetDepth)) {
          configurationSettingsDescription.withOptionSettings(
              ConfigurationOptionSettingStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

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

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

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

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

        if (context.testExpression("EventDate", targetDepth)) {
          eventDescription.setEventDate(DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Message", targetDepth)) {
          eventDescription.setMessage(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("ApplicationName", targetDepth)) {
          eventDescription.setApplicationName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("VersionLabel", targetDepth)) {
          eventDescription.setVersionLabel(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("TemplateName", targetDepth)) {
          eventDescription.setTemplateName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("EnvironmentName", targetDepth)) {
          eventDescription.setEnvironmentName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("RequestId", targetDepth)) {
          eventDescription.setRequestId(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Severity", targetDepth)) {
          eventDescription.setSeverity(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return eventDescription;
        }
      }
    }
  }
  public EnvironmentDescription unmarshall(StaxUnmarshallerContext context) throws Exception {
    EnvironmentDescription environmentDescription = new EnvironmentDescription();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

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

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("EnvironmentName", targetDepth)) {
          environmentDescription.setEnvironmentName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("EnvironmentId", targetDepth)) {
          environmentDescription.setEnvironmentId(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ApplicationName", targetDepth)) {
          environmentDescription.setApplicationName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("VersionLabel", targetDepth)) {
          environmentDescription.setVersionLabel(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("SolutionStackName", targetDepth)) {
          environmentDescription.setSolutionStackName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("TemplateName", targetDepth)) {
          environmentDescription.setTemplateName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Description", targetDepth)) {
          environmentDescription.setDescription(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("EndpointURL", targetDepth)) {
          environmentDescription.setEndpointURL(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("CNAME", targetDepth)) {
          environmentDescription.setCNAME(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("DateCreated", targetDepth)) {
          environmentDescription.setDateCreated(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("DateUpdated", targetDepth)) {
          environmentDescription.setDateUpdated(
              DateStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Status", targetDepth)) {
          environmentDescription.setStatus(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Health", targetDepth)) {
          environmentDescription.setHealth(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return environmentDescription;
        }
      }
    }
  }