private static void toSlime(Autoscaling autoscaling, Cursor autoscalingObject) {
        autoscalingObject.setString("status", autoscaling.status().name());
        autoscalingObject.setString("description", autoscaling.description());
        autoscaling.resources().ifPresent(resources -> toSlime(resources, autoscalingObject.setObject("resources")));
        autoscalingObject.setLong("at", autoscaling.at().toEpochMilli());
        toSlime(autoscaling.peak(), autoscalingObject.setObject("peak"));
        toSlime(autoscaling.ideal(), autoscalingObject.setObject("ideal"));
        toSlime(autoscaling.metrics(), autoscalingObject.setObject("metrics"));
    }
Serializes application information for nodes/v2/application responses

@author bratseth
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/ApplicationSerializer.java