MetricDescriptor

google.api. MetricDescriptor

Represents a MetricDescriptor.

Constructor

new MetricDescriptor(propertiesopt)

Constructs a new MetricDescriptor.

Parameters:
Name Type Attributes Description
properties google.api.IMetricDescriptor <optional>

Properties to set

Implements:
  • IMetricDescriptor

Classes

MetricDescriptorMetadata

Members

(static) MetricKind :number

MetricKind enum.

Properties:
Name Type Description
METRIC_KIND_UNSPECIFIED number

METRIC_KIND_UNSPECIFIED value

GAUGE number

GAUGE value

DELTA number

DELTA value

CUMULATIVE number

CUMULATIVE value

(static) ValueType :number

ValueType enum.

Properties:
Name Type Description
VALUE_TYPE_UNSPECIFIED number

VALUE_TYPE_UNSPECIFIED value

BOOL number

BOOL value

INT64 number

INT64 value

DOUBLE number

DOUBLE value

STRING number

STRING value

DISTRIBUTION number

DISTRIBUTION value

MONEY number

MONEY value

description :string

MetricDescriptor description.

displayName :string

MetricDescriptor displayName.

labels :Array.<google.api.ILabelDescriptor>

MetricDescriptor labels.

launchStage :google.api.LaunchStage

MetricDescriptor launchStage.

metadata :google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined

MetricDescriptor metadata.

metricKind :google.api.MetricDescriptor.MetricKind

MetricDescriptor metricKind.

name :string

MetricDescriptor name.

type :string

MetricDescriptor type.

unit :string

MetricDescriptor unit.

valueType :google.api.MetricDescriptor.ValueType

MetricDescriptor valueType.

Methods

(static) create(propertiesopt) → {google.api.MetricDescriptor}

Creates a new MetricDescriptor instance using the specified properties.

Parameters:
Name Type Attributes Description
properties google.api.IMetricDescriptor <optional>

Properties to set

(static) decode(reader, lengthopt) → {google.api.MetricDescriptor}

Decodes a MetricDescriptor message from the specified reader or buffer.

Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

length number <optional>

Message length if known beforehand

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) decodeDelimited(reader) → {google.api.MetricDescriptor}

Decodes a MetricDescriptor message from the specified reader or buffer, length delimited.

Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified MetricDescriptor message. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.api.IMetricDescriptor

MetricDescriptor message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

Encodes the specified MetricDescriptor message, length delimited. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.api.IMetricDescriptor

MetricDescriptor message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) fromObject(object) → {google.api.MetricDescriptor}

Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types.

Parameters:
Name Type Description
object Object.<string, *>

Plain object

(static) toObject(message, optionsopt) → {Object.<string, *>}

Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified.

Parameters:
Name Type Attributes Description
message google.api.MetricDescriptor

MetricDescriptor

options $protobuf.IConversionOptions <optional>

Conversion options

(static) verify(message) → {string|null}

Verifies a MetricDescriptor message.

Parameters:
Name Type Description
message Object.<string, *>

Plain object to verify

toJSON() → {Object.<string, *>}

Converts this MetricDescriptor to JSON.