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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
Static Fields
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static Metric getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Metric.Builder newBuilder()
newBuilder(Metric prototype)
public static Metric.Builder newBuilder(Metric prototype)
Parameter |
---|
Name | Description |
prototype | Metric
|
public static Metric parseDelimitedFrom(InputStream input)
public static Metric parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Metric parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Metric parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(CodedInputStream input)
public static Metric parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(InputStream input)
public static Metric parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Metric parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Metric parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Metric> parser()
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;
Parameter |
---|
Name | Description |
key | String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getDefaultInstanceForType()
public Metric getDefaultInstanceForType()
getLabels()
public Map<String,String> getLabels()
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;
Returns |
---|
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;
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;
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;
Parameter |
---|
Name | Description |
key | String
|
getParserForType()
public Parser<Metric> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
getType()
An existing metric type, see
google.api.MetricDescriptor. For example,
custom.googleapis.com/invoice/paid/amount
.
string type = 3;
Returns |
---|
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;
Returns |
---|
Type | Description |
ByteString | The bytes for type.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public Metric.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Metric.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public Metric.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides