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

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

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

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

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

        if (context.testExpression("Name", targetDepth)) {
          trafficPolicySummary.setName(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("Type", targetDepth)) {
          trafficPolicySummary.setType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("LatestVersion", targetDepth)) {
          trafficPolicySummary.setLatestVersion(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }

        if (context.testExpression("TrafficPolicyCount", targetDepth)) {
          trafficPolicySummary.setTrafficPolicyCount(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return trafficPolicySummary;
        }
      }
    }
  }
  public HealthCheckConfig unmarshall(StaxUnmarshallerContext context) throws Exception {
    HealthCheckConfig healthCheckConfig = new HealthCheckConfig();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;
    if (context.isStartOfDocument()) targetDepth += 1;

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

      if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
        if (context.testExpression("IPAddress", targetDepth)) {
          healthCheckConfig.setIPAddress(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Port", targetDepth)) {
          healthCheckConfig.setPort(IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Type", targetDepth)) {
          healthCheckConfig.setType(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ResourcePath", targetDepth)) {
          healthCheckConfig.setResourcePath(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("FullyQualifiedDomainName", targetDepth)) {
          healthCheckConfig.setFullyQualifiedDomainName(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("SearchString", targetDepth)) {
          healthCheckConfig.setSearchString(
              StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("RequestInterval", targetDepth)) {
          healthCheckConfig.setRequestInterval(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("FailureThreshold", targetDepth)) {
          healthCheckConfig.setFailureThreshold(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("MeasureLatency", targetDepth)) {
          healthCheckConfig.setMeasureLatency(
              BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("Inverted", targetDepth)) {
          healthCheckConfig.setInverted(BooleanStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("HealthThreshold", targetDepth)) {
          healthCheckConfig.setHealthThreshold(
              IntegerStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
        if (context.testExpression("ChildHealthChecks/ChildHealthCheck", targetDepth)) {
          healthCheckConfig
              .getChildHealthChecks()
              .add(StringStaxUnmarshaller.getInstance().unmarshall(context));
          continue;
        }
      } else if (xmlEvent.isEndElement()) {
        if (context.getCurrentDepth() < originalDepth) {
          return healthCheckConfig;
        }
      }
    }
  }