Class MetricRule
Bind API methods to metrics. Binding a method to a metric causes that
metric's configured quota behaviors to apply to the method call.
Inheritance
System.Object
MetricRule
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class MetricRule : IMessage<MetricRule>, IMessage, IEquatable<MetricRule>, IDeepCloneable<MetricRule>
Constructors
MetricRule()
Declaration
MetricRule(MetricRule)
Declaration
public MetricRule(MetricRule other)
Parameters
Fields
MetricCostsFieldNumber
Field number for the "metric_costs" field.
Declaration
public const int MetricCostsFieldNumber = 2
Field Value
Type |
Description |
System.Int32 |
|
SelectorFieldNumber
Field number for the "selector" field.
Declaration
public const int SelectorFieldNumber = 1
Field Value
Type |
Description |
System.Int32 |
|
Properties
Descriptor
Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
MetricCosts
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.
Declaration
public MapField<string, long> MetricCosts { get; }
Property Value
Type |
Description |
MapField<System.String, System.Int64> |
|
Parser
Declaration
public static MessageParser<MetricRule> Parser { get; }
Property Value
Selector
Selects the methods to which this rule applies.
Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
Declaration
public string Selector { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
CalculateSize()
Declaration
public int CalculateSize()
Returns
Type |
Description |
System.Int32 |
|
Implements
Clone()
Declaration
public MetricRule Clone()
Returns
Implements
Equals(MetricRule)
Declaration
public bool Equals(MetricRule other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>.Equals(T)
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
MergeFrom(MetricRule)
Declaration
public void MergeFrom(MetricRule other)
Parameters
Implements
Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Implements
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
WriteTo(CodedOutputStream)
Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Implements
Explicit Interface Implementations
IMessage.Descriptor
Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Implements