MetricRule
class MetricRule extends Message
Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota, billing, and monitoring behaviors to apply to the method call.
Used by metric-based quotas only.
Protobuf type Google\Api\MetricRule
Methods
No description
Selects the methods to which this rule applies.
Selects the methods to which this rule applies.
Metrics to update when the selected methods are called, and the associated cost applied to each metric.
Metrics to update when the selected methods are called, and the associated cost applied to each metric.
Details
at line 39
__construct()
at line 51
string
getSelector()
Selects the methods to which this rule applies.
Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
Generated from protobuf field string selector = 1;
at line 63
setSelector(string $var)
Selects the methods to which this rule applies.
Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
Generated from protobuf field string selector = 1;
at line 79
RepeatedField
getMetricCosts()
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.
Generated from protobuf field map<string, int64> metric_costs = 2;
at line 94
setMetricCosts(array|RepeatedField $var)
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.
Generated from protobuf field map<string, int64> metric_costs = 2;