class Metric extends Message

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

Generated from protobuf message google.api.Metric

Methods

__construct(array $data = NULL)

Constructor.

string
getType()

An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].

$this
setType(string $var)

An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].

MapField
getLabels()

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

$this
setLabels(array|MapField $var)

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

Details

at line 48
__construct(array $data = NULL)

Constructor.

Parameters

array $data { Optional. Data for populating the Message object.

@type string $type
      An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
      For example, `custom.googleapis.com/invoice/paid/amount`.
@type array|\Google\Protobuf\Internal\MapField $labels
      The set of label values that uniquely identify this metric. All
      labels listed in the `MetricDescriptor` must be assigned values.

}

at line 60
string getType()

An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].

For example, custom.googleapis.com/invoice/paid/amount.

Generated from protobuf field string type = 3;

Return Value

string

at line 73
$this setType(string $var)

An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].

For example, custom.googleapis.com/invoice/paid/amount.

Generated from protobuf field string type = 3;

Parameters

string $var

Return Value

$this

at line 88
MapField getLabels()

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

Generated from protobuf field map<string, string> labels = 2;

Return Value

MapField

at line 101
$this setLabels(array|MapField $var)

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

Generated from protobuf field map<string, string> labels = 2;

Parameters

array|MapField $var

Return Value

$this