Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/metric.proto
package org.apache.rocketmq.shaded.com.google.api;
/**
*
*
*
* A specific metric, identified by specifying values for all of the
* labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
*
*
* Protobuf type {@code google.api.Metric}
*/
public final class Metric extends org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.api.Metric)
MetricOrBuilder {
private static final long serialVersionUID = 0L;
// Use Metric.newBuilder() to construct.
private Metric(org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private Metric() {
type_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Metric();
}
@java.lang.Override
public final org.apache.rocketmq.shaded.com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private Metric(
org.apache.rocketmq.shaded.com.google.protobuf.CodedInputStream input,
org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
org.apache.rocketmq.shaded.com.google.protobuf.UnknownFieldSet.Builder unknownFields =
org.apache.rocketmq.shaded.com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18:
{
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ =
org.apache.rocketmq.shaded.com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
org.apache.rocketmq.shaded.com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(labels__.getKey(), labels__.getValue());
break;
}
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
type_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (org.apache.rocketmq.shaded.com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return org.apache.rocketmq.shaded.com.google.api.MetricProto.internal_static_google_api_Metric_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected org.apache.rocketmq.shaded.com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 2:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.rocketmq.shaded.com.google.api.MetricProto.internal_static_google_api_Metric_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.rocketmq.shaded.com.google.api.Metric.class, org.apache.rocketmq.shaded.com.google.api.Metric.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 3;
private volatile java.lang.Object type_;
/**
*
*
*
* An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
* For example, `custom.googleapis.com/invoice/paid/amount`.
*
* An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
* For example, `custom.googleapis.com/invoice/paid/amount`.
*
*
* string type = 3;
*
* @return The bytes for type.
*/
@java.lang.Override
public org.apache.rocketmq.shaded.com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
org.apache.rocketmq.shaded.com.google.protobuf.ByteString b =
org.apache.rocketmq.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (org.apache.rocketmq.shaded.com.google.protobuf.ByteString) ref;
}
}
public static final int LABELS_FIELD_NUMBER = 2;
private static final class LabelsDefaultEntryHolder {
static final org.apache.rocketmq.shaded.com.google.protobuf.MapEntry defaultEntry =
org.apache.rocketmq.shaded.com.google.protobuf.MapEntry.newDefaultInstance(
org.apache.rocketmq.shaded.com.google.api.MetricProto.internal_static_google_api_Metric_LabelsEntry_descriptor,
org.apache.rocketmq.shaded.com.google.protobuf.WireFormat.FieldType.STRING,
"",
org.apache.rocketmq.shaded.com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private org.apache.rocketmq.shaded.com.google.protobuf.MapField labels_;
private org.apache.rocketmq.shaded.com.google.protobuf.MapField internalGetLabels() {
if (labels_ == null) {
return org.apache.rocketmq.shaded.com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
*
*
* 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;
*/
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
/** Use {@link #getLabelsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
*
*
* The set of label values that uniquely identify this metric. All
* labels listed in the `MetricDescriptor` must be assigned 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;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(org.apache.rocketmq.shaded.com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2);
if (!org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry :
internalGetLabels().getMap().entrySet()) {
org.apache.rocketmq.shaded.com.google.protobuf.MapEntry labels__ =
LabelsDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += org.apache.rocketmq.shaded.com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__);
}
if (!org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) {
size += org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.apache.rocketmq.shaded.com.google.api.Metric)) {
return super.equals(obj);
}
org.apache.rocketmq.shaded.com.google.api.Metric other = (org.apache.rocketmq.shaded.com.google.api.Metric) obj;
if (!getType().equals(other.getType())) return false;
if (!internalGetLabels().equals(other.internalGetLabels())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getType().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(java.nio.ByteBuffer data)
throws org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(
java.nio.ByteBuffer data, org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(org.apache.rocketmq.shaded.com.google.protobuf.ByteString data)
throws org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(
org.apache.rocketmq.shaded.com.google.protobuf.ByteString data,
org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(byte[] data)
throws org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(
byte[] data, org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(java.io.InputStream input)
throws java.io.IOException {
return org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(
java.io.InputStream input, org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseDelimitedFrom(
java.io.InputStream input, org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(org.apache.rocketmq.shaded.com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static org.apache.rocketmq.shaded.com.google.api.Metric parseFrom(
org.apache.rocketmq.shaded.com.google.protobuf.CodedInputStream input,
org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.apache.rocketmq.shaded.com.google.api.Metric prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* A specific metric, identified by specifying values for all of the
* labels of a [`MetricDescriptor`][google.api.MetricDescriptor].
*
*
* Protobuf type {@code google.api.Metric}
*/
public static final class Builder extends org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.api.Metric)
org.apache.rocketmq.shaded.com.google.api.MetricOrBuilder {
public static final org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return org.apache.rocketmq.shaded.com.google.api.MetricProto.internal_static_google_api_Metric_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected org.apache.rocketmq.shaded.com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 2:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected org.apache.rocketmq.shaded.com.google.protobuf.MapField internalGetMutableMapField(int number) {
switch (number) {
case 2:
return internalGetMutableLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.rocketmq.shaded.com.google.api.MetricProto.internal_static_google_api_Metric_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.rocketmq.shaded.com.google.api.Metric.class, org.apache.rocketmq.shaded.com.google.api.Metric.Builder.class);
}
// Construct using org.apache.rocketmq.shaded.com.google.api.Metric.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (org.apache.rocketmq.shaded.com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = "";
internalGetMutableLabels().clear();
return this;
}
@java.lang.Override
public org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return org.apache.rocketmq.shaded.com.google.api.MetricProto.internal_static_google_api_Metric_descriptor;
}
@java.lang.Override
public org.apache.rocketmq.shaded.com.google.api.Metric getDefaultInstanceForType() {
return org.apache.rocketmq.shaded.com.google.api.Metric.getDefaultInstance();
}
@java.lang.Override
public org.apache.rocketmq.shaded.com.google.api.Metric build() {
org.apache.rocketmq.shaded.com.google.api.Metric result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.rocketmq.shaded.com.google.api.Metric buildPartial() {
org.apache.rocketmq.shaded.com.google.api.Metric result = new org.apache.rocketmq.shaded.com.google.api.Metric(this);
int from_bitField0_ = bitField0_;
result.type_ = type_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
org.apache.rocketmq.shaded.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(org.apache.rocketmq.shaded.com.google.protobuf.Message other) {
if (other instanceof org.apache.rocketmq.shaded.com.google.api.Metric) {
return mergeFrom((org.apache.rocketmq.shaded.com.google.api.Metric) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.rocketmq.shaded.com.google.api.Metric other) {
if (other == org.apache.rocketmq.shaded.com.google.api.Metric.getDefaultInstance()) return this;
if (!other.getType().isEmpty()) {
type_ = other.type_;
onChanged();
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
org.apache.rocketmq.shaded.com.google.protobuf.CodedInputStream input,
org.apache.rocketmq.shaded.com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.apache.rocketmq.shaded.com.google.api.Metric parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.apache.rocketmq.shaded.com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.rocketmq.shaded.com.google.api.Metric) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object type_ = "";
/**
*
*
*
* An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
* For example, `custom.googleapis.com/invoice/paid/amount`.
*
* An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
* For example, `custom.googleapis.com/invoice/paid/amount`.
*
*
* string type = 3;
*
* @return The bytes for type.
*/
public org.apache.rocketmq.shaded.com.google.protobuf.ByteString getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
org.apache.rocketmq.shaded.com.google.protobuf.ByteString b =
org.apache.rocketmq.shaded.com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
type_ = b;
return b;
} else {
return (org.apache.rocketmq.shaded.com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
* For example, `custom.googleapis.com/invoice/paid/amount`.
*
*
* string type = 3;
*
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value;
onChanged();
return this;
}
/**
*
*
*
* An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
* For example, `custom.googleapis.com/invoice/paid/amount`.
*
*
* string type = 3;
*
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
*
*
*
* An existing metric type, see [google.api.MetricDescriptor][google.api.MetricDescriptor].
* For example, `custom.googleapis.com/invoice/paid/amount`.
*
*
* string type = 3;
*
* @param value The bytes for type to set.
* @return This builder for chaining.
*/
public Builder setTypeBytes(org.apache.rocketmq.shaded.com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
type_ = value;
onChanged();
return this;
}
private org.apache.rocketmq.shaded.com.google.protobuf.MapField labels_;
private org.apache.rocketmq.shaded.com.google.protobuf.MapField internalGetLabels() {
if (labels_ == null) {
return org.apache.rocketmq.shaded.com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private org.apache.rocketmq.shaded.com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();
;
if (labels_ == null) {
labels_ = org.apache.rocketmq.shaded.com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
*
*
* 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;
*/
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
/** Use {@link #getLabelsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
*
*
* The set of label values that uniquely identify this metric. All
* labels listed in the `MetricDescriptor` must be assigned values.
*