public StopDeploymentResult unmarshall(JsonUnmarshallerContext context) throws Exception {
    StopDeploymentResult stopDeploymentResult = new StopDeploymentResult();

    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("status", targetDepth)) {
          context.nextToken();
          stopDeploymentResult.setStatus(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("statusMessage", targetDepth)) {
          context.nextToken();
          stopDeploymentResult.setStatusMessage(
              StringJsonUnmarshaller.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 stopDeploymentResult;
  }
  public ListOnPremisesInstancesResult unmarshall(JsonUnmarshallerContext context)
      throws Exception {
    ListOnPremisesInstancesResult listOnPremisesInstancesResult =
        new ListOnPremisesInstancesResult();

    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("instanceNames", targetDepth)) {
          context.nextToken();
          listOnPremisesInstancesResult.setInstanceNames(
              new ListUnmarshaller<String>(StringJsonUnmarshaller.getInstance())
                  .unmarshall(context));
        }
        if (context.testExpression("nextToken", targetDepth)) {
          context.nextToken();
          listOnPremisesInstancesResult.setNextToken(
              StringJsonUnmarshaller.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 listOnPremisesInstancesResult;
  }