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

description

MetricDescriptor description.

displayName

MetricDescriptor displayName.

labels

MetricDescriptor labels.

launchStage

MetricDescriptor launchStage.

metadata

MetricDescriptor metadata.

metricKind

MetricDescriptor metricKind.

monitoredResourceTypes

MetricDescriptor monitoredResourceTypes.

name

MetricDescriptor name.

type

MetricDescriptor type.

unit

MetricDescriptor unit.

valueType

MetricDescriptor valueType.

MetricKind

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

ValueType

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

Methods

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

Converts this MetricDescriptor to JSON.

Returns:
Type Description
Object.<string, *>

JSON object

(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

Returns:
Type Description
google.api.MetricDescriptor

MetricDescriptor instance

(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

Returns:
Type Description
google.api.MetricDescriptor

MetricDescriptor

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

Returns:
Type Description
google.api.MetricDescriptor

MetricDescriptor

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

Returns:
Type Description
$protobuf.Writer

Writer

(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

Returns:
Type Description
$protobuf.Writer

Writer

(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

Returns:
Type Description
google.api.MetricDescriptor

MetricDescriptor

(static) getTypeUrl(typeUrlPrefixopt) → {string}

Gets the default type url for MetricDescriptor

Parameters:
Name Type Attributes Description
typeUrlPrefix string <optional>

your custom typeUrlPrefix(default "type.googleapis.com")

Returns:
Type Description
string

The default type url

(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

Returns:
Type Description
Object.<string, *>

Plain object

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

Verifies a MetricDescriptor message.

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

Plain object to verify

Returns:
Type Description
string | null

null if valid, otherwise the reason why it is not