class AssetGroupUtil {

    public static Map<String, Object> fetchTaggingSummary(String compapiuri, String ag ,String token) throws Exception {
        Map<String, Object> taggingSummary = new HashMap<>();
        try {
            String taggingSummaryResponse = HttpUtil.get(compapiuri + "/tagging?ag=" + ag,token);
            JsonObject taggingSummaryJson = new JsonParser().parse(taggingSummaryResponse).getAsJsonObject();
            JsonObject taggingJsonObj = taggingSummaryJson.get("data").getAsJsonObject().get(OUTPUT)
                    .getAsJsonObject();
            long total = taggingJsonObj.get("assets").getAsLong();
            long noncompliant = taggingJsonObj.get("untagged").getAsLong();
            long compliant = taggingJsonObj.get("tagged").getAsLong();
            taggingSummary.put(TOTAL, total);
            taggingSummary.put(NON_COMPLIANT, noncompliant);
            taggingSummary.put(COMPLIANT, compliant);
        } catch (Exception e) {
            LOGGER.error("Error retrieving tagging sumamary " , e);
            throw e;
        }
        return taggingSummary;
    }

    private  AssetGroupUtil();

}