Show / Hide Table of Contents

Class Metric

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

Inheritance
System.Object
Metric
Implements
IMessage<Metric>
IMessage
System.IEquatable<Metric>
IDeepCloneable<Metric>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Api
Assembly: Google.Api.CommonProtos.dll
Syntax
public sealed class Metric : IMessage<Metric>, IMessage, IEquatable<Metric>, IDeepCloneable<Metric>

Constructors

Metric()

Declaration
public Metric()

Metric(Metric)

Declaration
public Metric(Metric other)
Parameters
Type Name Description
Metric other

Fields

LabelsFieldNumber

Field number for the "labels" field.

Declaration
public const int LabelsFieldNumber = 2
Field Value
Type Description
System.Int32

TypeFieldNumber

Field number for the "type" field.

Declaration
public const int TypeFieldNumber = 3
Field Value
Type Description
System.Int32

Properties

Descriptor

Declaration
public static MessageDescriptor Descriptor { get; }
Property Value
Type Description
MessageDescriptor

Labels

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

Declaration
public MapField<string, string> Labels { get; }
Property Value
Type Description
MapField<System.String, System.String>

Parser

Declaration
public static MessageParser<Metric> Parser { get; }
Property Value
Type Description
MessageParser<Metric>

Type

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

Declaration
public string Type { get; set; }
Property Value
Type Description
System.String

Methods

CalculateSize()

Declaration
public int CalculateSize()
Returns
Type Description
System.Int32
Implements
IMessage.CalculateSize()

Clone()

Declaration
public Metric Clone()
Returns
Type Description
Metric
Implements
IDeepCloneable<T>.Clone()

Equals(Metric)

Declaration
public bool Equals(Metric other)
Parameters
Type Name Description
Metric other
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(Metric)

Declaration
public void MergeFrom(Metric other)
Parameters
Type Name Description
Metric other
Implements
IMessage<T>.MergeFrom(T)

MergeFrom(CodedInputStream)

Declaration
public void MergeFrom(CodedInputStream input)
Parameters
Type Name Description
CodedInputStream input
Implements
IMessage.MergeFrom(CodedInputStream)

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

WriteTo(CodedOutputStream)

Declaration
public void WriteTo(CodedOutputStream output)
Parameters
Type Name Description
CodedOutputStream output
Implements
IMessage.WriteTo(CodedOutputStream)

Explicit Interface Implementations

IMessage.Descriptor

Declaration
MessageDescriptor IMessage.Descriptor { get; }
Returns
Type Description
MessageDescriptor
Implements
IMessage.Descriptor
Back to top