public AutoScalingThresholds unmarshall(JsonUnmarshallerContext context) throws Exception {
    AutoScalingThresholds autoScalingThresholds = new AutoScalingThresholds();

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

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) break;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("InstanceCount", targetDepth)) {
          context.nextToken();
          autoScalingThresholds.setInstanceCount(
              IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("ThresholdsWaitTime", targetDepth)) {
          context.nextToken();
          autoScalingThresholds.setThresholdsWaitTime(
              IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("IgnoreMetricsTime", targetDepth)) {
          context.nextToken();
          autoScalingThresholds.setIgnoreMetricsTime(
              IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("CpuThreshold", targetDepth)) {
          context.nextToken();
          autoScalingThresholds.setCpuThreshold(
              DoubleJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("MemoryThreshold", targetDepth)) {
          context.nextToken();
          autoScalingThresholds.setMemoryThreshold(
              DoubleJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("LoadThreshold", targetDepth)) {
          context.nextToken();
          autoScalingThresholds.setLoadThreshold(
              DoubleJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getLastParsedParentElement() == null
            || context.getLastParsedParentElement().equals(currentParentElement)) {
          if (context.getCurrentDepth() <= originalDepth) break;
        }
      }

      token = context.nextToken();
    }

    return autoScalingThresholds;
  }
  public WorkflowExecutionCount unmarshall(JsonUnmarshallerContext context) throws Exception {
    WorkflowExecutionCount workflowExecutionCount = new WorkflowExecutionCount();
    int originalDepth = context.getCurrentDepth();
    int targetDepth = originalDepth + 1;

    JsonToken token = context.currentToken;
    if (token == null) token = context.nextToken();

    while (true) {
      if (token == null) return workflowExecutionCount;

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("count", targetDepth)) {
          context.nextToken();
          workflowExecutionCount.setCount(
              IntegerJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("truncated", targetDepth)) {
          context.nextToken();
          workflowExecutionCount.setTruncated(
              BooleanJsonUnmarshaller.getInstance().unmarshall(context));
        }
      } else if (token == END_ARRAY || token == END_OBJECT) {
        if (context.getCurrentDepth() <= originalDepth) {
          return workflowExecutionCount;
        }
      }
      token = context.nextToken();
    }
  }