/** * <pre> * The set of label values that uniquely identify this metric. All * labels listed in the `MetricDescriptor` must be assigned values. * </pre> * * <code>map<string, string> labels = 2;</code> */ public Builder putLabels( java.lang.String key, java.lang.String value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableLabels().getMutableMap() .put(key, value); return this; } /**
@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 2: return internalGetMutableLabels(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
/** * <pre> * The set of label values that uniquely identify this metric. All * labels listed in the `MetricDescriptor` must be assigned values. * </pre> * * <code>map<string, string> labels = 2;</code> */ public Builder removeLabels( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableLabels().getMutableMap() .remove(key); return this; } /**
/** * <pre> * The set of label values that uniquely identify this metric. All * labels listed in the `MetricDescriptor` must be assigned values. * </pre> * * <code>map<string, string> labels = 2;</code> */ public Builder putAllLabels( java.util.Map<java.lang.String, java.lang.String> values) { internalGetMutableLabels().getMutableMap() .putAll(values); return this; } public final Builder setUnknownFields(
public Builder clear() { super.clear(); type_ = ""; internalGetMutableLabels().clear(); return this; }
/** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() { return internalGetMutableLabels().getMutableMap(); } /**
public Builder clearLabels() { internalGetMutableLabels().getMutableMap() .clear(); return this; } /**
public Builder mergeFrom(com.google.api.Metric other) { if (other == com.google.api.Metric.getDefaultInstance()) return this; if (!other.getType().isEmpty()) { type_ = other.type_; onChanged(); } internalGetMutableLabels().mergeFrom( other.internalGetLabels()); onChanged(); return this; }