}
Iterable<ServerInfo> serverInfoList = (Iterable<ServerInfo>) payload;
JsonArray serversJsonArray = new JsonArray();
for (ServerInfo serverInfo : serverInfoList) {
JsonObject driveObject = createServerInfoRequestToJson.apply(serverInfo);
serversJsonArray.add(driveObject);
}
JsonObject json = new JsonObject();
json.add("objects", serversJsonArray);
request.setPayload(json.toString());
request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
return request;
}