public ActivityType unmarshall(JsonUnmarshallerContext context) throws Exception {
    ActivityType activityType = new ActivityType();

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

    JsonToken token = context.currentToken;
    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();
          activityType.setName(StringJsonUnmarshaller.getInstance().unmarshall(context));
        }
        if (context.testExpression("version", targetDepth)) {
          context.nextToken();
          activityType.setVersion(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 activityType;
  }
  @SuppressWarnings({"unchecked", "rawtypes"})
  protected Promise<Void> actUnloadImpl(
      final Promise<java.lang.String> date,
      final ActivitySchedulingOptions optionsOverride,
      Promise<?>... waitFor) {

    ActivityType activityType = new ActivityType();
    activityType.setName("Unload to S3");
    activityType.setVersion("5.0");

    Promise[] _input_ = new Promise[1];
    _input_[0] = date;

    return (Promise) scheduleActivity(activityType, _input_, optionsOverride, Void.class, waitFor);
  }