public MapField<string, long> MetricCosts { get; }
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["`MetricRule` is a class that binds API methods to metrics, applying configured quota behaviors to method calls."],["The class implements several interfaces, including `IMessage`, `IEquatable`, `IDeepCloneable`, and `IBufferMessage`, and inherits from the `object` class."],["Key properties include `MetricCosts`, which defines the metrics to update and their associated costs when selected methods are called, and `Selector`, which specifies the methods this rule applies to."],["`MetricRule` provides methods such as `Clone()`, `Equals()`, `GetHashCode()`, `MergeFrom()`, `CalculateSize()`, `WriteTo()` and `ToString()` to manage the object, and provides constructor methods `MetricRule()` and `MetricRule(MetricRule other)` to create new instances."],["The class has two constant fields, `MetricCostsFieldNumber` and `SelectorFieldNumber`, that are used as field numbers and are of type `int`, in addition to `Descriptor` and `Parser` properties."]]],[]]