public ComplianceByResource unmarshall(JsonUnmarshallerContext context) throws Exception {
    ComplianceByResource complianceByResource = new ComplianceByResource();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

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

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("ResourceType", targetDepth)) {
          context.nextToken();
          complianceByResource.setResourceType(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("ResourceId", targetDepth)) {
          context.nextToken();
          complianceByResource.setResourceId(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("Compliance", targetDepth)) {
          context.nextToken();
          complianceByResource.setCompliance(
              ComplianceJsonUnmarshaller.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 complianceByResource;
  }
  public ConfigurationRecorderStatus unmarshall(JsonUnmarshallerContext context) throws Exception {
    ConfigurationRecorderStatus configurationRecorderStatus = new ConfigurationRecorderStatus();

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

    JsonToken token = context.getCurrentToken();
    if (token == null) token = context.nextToken();
    if (token == VALUE_NULL) return null;

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

      if (token == FIELD_NAME || token == START_OBJECT) {
        if (context.testExpression("name", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setName(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStartTime", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStartTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStopTime", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStopTime(
              DateJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("recording", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setRecording(
              BooleanJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStatus", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStatus(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastErrorCode", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastErrorCode(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastErrorMessage", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastErrorMessage(
              StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("lastStatusChangeTime", targetDepth)) {
          context.nextToken();
          configurationRecorderStatus.setLastStatusChangeTime(
              DateJsonUnmarshaller.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 configurationRecorderStatus;
  }