code: public long getMetricCostsOrThrow(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, java.lang.Long> map =
          internalGetMetricCosts().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }
docs: <pre>
  Metrics to update when the selected methods are called, and the associated
  cost applied to each metric.
  The key of the map is the metric name, and the values are the amount
  increased for the metric against which the quota limits are defined.
  The value must not be negative.
  </pre>
  
  <code>map&lt;string, int64&gt; metric_costs = 2;</code>