code: public static <T> T getAggBuckets(Map<String,?> map ,String metrics,Class<T> typeReference){
  		if(map != null) {
  			Map<String, Object> metrics_ = (Map<String, Object>) map.get(metrics);
  			if (metrics_ != null) {
  				return (T) metrics_.get("buckets");
  			}
  		}
  		return (T)null;
  	}
docs: {
  "key": "demoproject",
  "doc_count": 30,
  "successsums": {
  "doc_count_error_upper_bound": 0,
  "sum_other_doc_count": 0,
  "buckets": [
  {
  "key": 0,
  "doc_count": 30
  }
  ]
  }
  },
  @param map
  @param metrics successsums->buckets
  @param typeReference
  @param <T>
  @return