Class Metric (2.2.0)

public sealed class Metric : Protobuf.IMessage<Metric>, Protobuf.IBufferMessage

A specific metric, identified by specifying values for all of the labels of a [MetricDescriptor][google.api.MetricDescriptor].

Inheritance

Object > Metric

Namespace

Google.Api

Assembly

Google.Api.CommonProtos.dll

Constructors

Metric()

public Metric()

Metric(Metric)

public Metric(Metric other)
Parameter
NameDescription
otherMetric

Fields

LabelsFieldNumber

public const int LabelsFieldNumber = 2

Field number for the "labels" field.

Field Value
TypeDescription
Int32

TypeFieldNumber

public const int TypeFieldNumber = 3

Field number for the "type" field.

Field Value
TypeDescription
Int32

Properties

Descriptor

public static Protobuf.Reflection.MessageDescriptor Descriptor { get; }
Property Value
TypeDescription
Protobuf.Reflection.MessageDescriptor

Labels

public Protobuf.Collections.MapField<string, string> Labels { get; }

The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.

Property Value
TypeDescription
Protobuf.Collections.MapField<String, String>

Parser

public static Protobuf.MessageParser<Metric> Parser { get; }
Property Value
TypeDescription
Protobuf.MessageParser<Metric>

Type

public string Type { get; set; }

An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, custom.googleapis.com/invoice/paid/amount.

Property Value
TypeDescription
String

Methods

CalculateSize()

public int CalculateSize()
Returns
TypeDescription
Int32

Clone()

public Metric Clone()
Returns
TypeDescription
Metric

Equals(Metric)

public bool Equals(Metric other)
Parameter
NameDescription
otherMetric
Returns
TypeDescription
Boolean

Equals(Object)

public override bool Equals(object other)
Parameter
NameDescription
otherObject
Returns
TypeDescription
Boolean

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32

MergeFrom(Metric)

public void MergeFrom(Metric other)
Parameter
NameDescription
otherMetric

MergeFrom(Protobuf.CodedInputStream)

public void MergeFrom(Protobuf.CodedInputStream input)
Parameter
NameDescription
inputProtobuf.CodedInputStream

ToString()

public override string ToString()
Returns
TypeDescription
String

WriteTo(Protobuf.CodedOutputStream)

public void WriteTo(Protobuf.CodedOutputStream output)
Parameter
NameDescription
outputProtobuf.CodedOutputStream