Interface MetricOrBuilder (2.32.0)

public interface MetricOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsLabels(String key)

public abstract boolean containsLabels(String key)

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

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getLabels() (deprecated)

public abstract Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public abstract int getLabelsCount()

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

map<string, string> labels = 2;

Returns
TypeDescription
int

getLabelsMap()

public abstract Map<String,String> getLabelsMap()

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

map<string, string> labels = 2;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public abstract String getLabelsOrDefault(String key, String defaultValue)

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

map<string, string> labels = 2;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public abstract String getLabelsOrThrow(String key)

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

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getType()

public abstract String getType()

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

string type = 3;

Returns
TypeDescription
String

The type.

getTypeBytes()

public abstract ByteString getTypeBytes()

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

string type = 3;

Returns
TypeDescription
ByteString

The bytes for type.