Object value() {
      if (!values().containsKey("value")) {
        String message = String.format(Locale.ROOT, "'value' field not present in "
                + "%s aggregation", getName());

        throw new IllegalStateException(message);
      }

      return values().get("value");
    }
For single value. Returns single value represented by this leaf aggregation.
@return value corresponding to {@code value}
criteria/elasticsearch/src/org/immutables/criteria/elasticsearch/Json.java