public final class Metric extends GeneratedMessageV3 implements MetricOrBuilder
A specific metric, identified by specifying values for all of the
labels of a MetricDescriptor
.
Protobuf type google.api.Metric
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > MetricImplements
MetricOrBuilderStatic Fields
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Type | Description |
int |
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Type | Description |
int |
Static Methods
getDefaultInstance()
public static Metric getDefaultInstance()
Type | Description |
Metric |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
newBuilder()
public static Metric.Builder newBuilder()
Type | Description |
Metric.Builder |
newBuilder(Metric prototype)
public static Metric.Builder newBuilder(Metric prototype)
Name | Description |
prototype | Metric |
Type | Description |
Metric.Builder |
parseDelimitedFrom(InputStream input)
public static Metric parseDelimitedFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
Metric |
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Metric parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Metric |
Type | Description |
IOException |
parseFrom(byte[] data)
public static Metric parseFrom(byte[] data)
Name | Description |
data | byte[] |
Type | Description |
Metric |
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Metric |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static Metric parseFrom(ByteString data)
Name | Description |
data | ByteString |
Type | Description |
Metric |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Metric |
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static Metric parseFrom(CodedInputStream input)
Name | Description |
input | CodedInputStream |
Type | Description |
Metric |
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Metric |
Type | Description |
IOException |
parseFrom(InputStream input)
public static Metric parseFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
Metric |
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Metric |
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static Metric parseFrom(ByteBuffer data)
Name | Description |
data | ByteBuffer |
Type | Description |
Metric |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Metric |
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<Metric> parser()
Type | Description |
Parser<Metric> |
Methods
containsLabels(String key)
public 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;
Name | Description |
key | String |
Type | Description |
boolean |
equals(Object obj)
public boolean equals(Object obj)
Name | Description |
obj | Object |
Type | Description |
boolean |
getDefaultInstanceForType()
public Metric getDefaultInstanceForType()
Type | Description |
Metric |
getLabels()
public Map<String,String> getLabels()
Use #getLabelsMap() instead.
Type | Description |
Map<String,String> |
getLabelsCount()
public 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;
Type | Description |
int |
getLabelsMap()
public 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;
Type | Description |
Map<String,String> |
getLabelsOrDefault(String key, String defaultValue)
public 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;
Name | Description |
key | String |
defaultValue | String |
Type | Description |
String |
getLabelsOrThrow(String key)
public 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;
Name | Description |
key | String |
Type | Description |
String |
getParserForType()
public Parser<Metric> getParserForType()
Type | Description |
Parser<Metric> |
getSerializedSize()
public int getSerializedSize()
Type | Description |
int |
getType()
public String getType()
An existing metric type, see google.api.MetricDescriptor.
For example, custom.googleapis.com/invoice/paid/amount
.
string type = 3;
Type | Description |
String | The type. |
getTypeBytes()
public ByteString getTypeBytes()
An existing metric type, see google.api.MetricDescriptor.
For example, custom.googleapis.com/invoice/paid/amount
.
string type = 3;
Type | Description |
ByteString | The bytes for type. |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Type | Description |
UnknownFieldSet |
hashCode()
public int hashCode()
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
newBuilderForType()
public Metric.Builder newBuilderForType()
Type | Description |
Metric.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Metric.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Name | Description |
parent | BuilderParent |
Type | Description |
Metric.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Name | Description |
unused | UnusedPrivateParameter |
Type | Description |
Object |
toBuilder()
public Metric.Builder toBuilder()
Type | Description |
Metric.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Name | Description |
output | CodedOutputStream |
Type | Description |
IOException |