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
.
Protobuf type google.api.Metric
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Metric.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Metric buildPartial()
Returns
clear()
public Metric.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public Metric.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearLabels()
public Metric.Builder clearLabels()
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public Metric.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearType()
public Metric.Builder clearType()
An existing metric type, see google.api.MetricDescriptor.
For example, custom.googleapis.com/invoice/paid/amount
.
string type = 3;
Returns
clone()
public Metric.Builder clone()
Returns
Overrides
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
Returns
getDefaultInstanceForType()
public Metric getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getLabels()
public Map<String,String> getLabels()
Returns
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
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;
Returns
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;
Parameters
Returns
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
Returns
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Returns
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
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Metric other)
public Metric.Builder mergeFrom(Metric other)
Parameter
Returns
public Metric.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Metric.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Metric.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllLabels(Map<String,String> values)
public Metric.Builder putAllLabels(Map<String,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;
Parameter
Returns
putLabels(String key, String value)
public Metric.Builder putLabels(String key, 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;
Parameters
Returns
removeLabels(String key)
public Metric.Builder removeLabels(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
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Metric.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Metric.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setType(String value)
public Metric.Builder setType(String value)
An existing metric type, see google.api.MetricDescriptor.
For example, custom.googleapis.com/invoice/paid/amount
.
string type = 3;
Parameter
Name | Description |
value | String
The type to set.
|
Returns
setTypeBytes(ByteString value)
public Metric.Builder setTypeBytes(ByteString value)
An existing metric type, see google.api.MetricDescriptor.
For example, custom.googleapis.com/invoice/paid/amount
.
string type = 3;
Parameter
Name | Description |
value | ByteString
The bytes for type to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final Metric.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides