private SortedMap<String, List<Map<String, String>>> getRepos(Request request) {

    SortedMap<String, List<Map<String, String>>> result = new TreeMap<>();

    Map<String, Object> first = Iterables.getFirst(request.getBody().getPropertySets(), null);

    if (first != null && first.get("operating_systems") instanceof Set) {
      Set<?> set = (Set<?>) first.get("operating_systems");
      result = createResultForOperationSystems(set);
    }
    return result;
  }
Assembles repositories from the request
operating system -> list of repositories where the repository is a map of properties (repo_id, repo_name, base_url)
@param request
@return a map of repositories
ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java