public static final class Metric.Builder extends GeneratedMessageV3.Builder<Metric.Builder> implements MetricOrBuilder
A specific metric, identified by specifying values for all of the labels of a [`MetricDescriptor`][google.api.MetricDescriptor].Protobuf type
google.api.Metric
Modifier and Type | Method and Description |
---|---|
Metric.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Metric |
build() |
Metric |
buildPartial() |
Metric.Builder |
clear() |
Metric.Builder |
clearField(Descriptors.FieldDescriptor field) |
Metric.Builder |
clearLabels() |
Metric.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
Metric.Builder |
clearType()
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
|
Metric.Builder |
clone() |
boolean |
containsLabels(java.lang.String key)
The set of label values that uniquely identify this metric.
|
Metric |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
java.util.Map<java.lang.String,java.lang.String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
The set of label values that uniquely identify this metric.
|
java.util.Map<java.lang.String,java.lang.String> |
getLabelsMap()
The set of label values that uniquely identify this metric.
|
java.lang.String |
getLabelsOrDefault(java.lang.String key,
java.lang.String defaultValue)
The set of label values that uniquely identify this metric.
|
java.lang.String |
getLabelsOrThrow(java.lang.String key)
The set of label values that uniquely identify this metric.
|
java.util.Map<java.lang.String,java.lang.String> |
getMutableLabels()
Deprecated.
|
java.lang.String |
getType()
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
|
ByteString |
getTypeBytes()
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
protected MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
Metric.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
Metric.Builder |
mergeFrom(Message other) |
Metric.Builder |
mergeFrom(Metric other) |
Metric.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
Metric.Builder |
putAllLabels(java.util.Map<java.lang.String,java.lang.String> values)
The set of label values that uniquely identify this metric.
|
Metric.Builder |
putLabels(java.lang.String key,
java.lang.String value)
The set of label values that uniquely identify this metric.
|
Metric.Builder |
removeLabels(java.lang.String key)
The set of label values that uniquely identify this metric.
|
Metric.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
Metric.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
Metric.Builder |
setType(java.lang.String value)
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
|
Metric.Builder |
setTypeBytes(ByteString value)
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
|
Metric.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3.Builder<Metric.Builder>
protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class GeneratedMessageV3.Builder<Metric.Builder>
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<Metric.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Metric build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Metric buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Metric.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Metric.Builder>
public Metric.Builder mergeFrom(Metric other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<Metric.Builder>
public Metric.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Metric.Builder>
java.io.IOException
public java.lang.String getType()
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, `custom.googleapis.com/invoice/paid/amount`.
string type = 3;
getType
in interface MetricOrBuilder
public ByteString getTypeBytes()
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, `custom.googleapis.com/invoice/paid/amount`.
string type = 3;
getTypeBytes
in interface MetricOrBuilder
public Metric.Builder setType(java.lang.String value)
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, `custom.googleapis.com/invoice/paid/amount`.
string type = 3;
public Metric.Builder clearType()
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, `custom.googleapis.com/invoice/paid/amount`.
string type = 3;
public Metric.Builder setTypeBytes(ByteString value)
An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, `custom.googleapis.com/invoice/paid/amount`.
string type = 3;
public int getLabelsCount()
MetricOrBuilder
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;
getLabelsCount
in interface MetricOrBuilder
public boolean containsLabels(java.lang.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;
containsLabels
in interface MetricOrBuilder
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getLabels()
getLabelsMap()
instead.getLabels
in interface MetricOrBuilder
public java.util.Map<java.lang.String,java.lang.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;
getLabelsMap
in interface MetricOrBuilder
public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.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;
getLabelsOrDefault
in interface MetricOrBuilder
public java.lang.String getLabelsOrThrow(java.lang.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;
getLabelsOrThrow
in interface MetricOrBuilder
public Metric.Builder clearLabels()
public Metric.Builder removeLabels(java.lang.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;
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getMutableLabels()
public Metric.Builder putLabels(java.lang.String key, java.lang.String value)
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;
public Metric.Builder putAllLabels(java.util.Map<java.lang.String,java.lang.String> values)
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;
public final Metric.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<Metric.Builder>
public final Metric.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<Metric.Builder>