com.lightstep.tracer.grpc.MetricPoint Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: metrics.proto
package com.lightstep.tracer.grpc;
/**
*
* MetricPoint is an update to a single measure.
*
*
* Protobuf type {@code lightstep.metrics.MetricPoint}
*/
public final class MetricPoint extends
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:lightstep.metrics.MetricPoint)
MetricPointOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetricPoint.newBuilder() to construct.
private MetricPoint(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MetricPoint() {
kind_ = 0;
metricName_ = "";
labels_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MetricPoint(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet.Builder unknownFields =
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
kind_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
metricName_ = s;
break;
}
case 26: {
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.Builder subBuilder = null;
if (start_ != null) {
subBuilder = start_.toBuilder();
}
start_ = input.readMessage(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(start_);
start_ = subBuilder.buildPartial();
}
break;
}
case 34: {
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.Builder subBuilder = null;
if (duration_ != null) {
subBuilder = duration_.toBuilder();
}
duration_ = input.readMessage(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(duration_);
duration_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
labels_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
labels_.add(
input.readMessage(com.lightstep.tracer.grpc.KeyValue.parser(), extensionRegistry));
break;
}
case 48: {
valueCase_ = 6;
value_ = input.readUInt64();
break;
}
case 57: {
valueCase_ = 7;
value_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000010) != 0)) {
labels_ = java.util.Collections.unmodifiableList(labels_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.lightstep.tracer.grpc.Metrics.internal_static_lightstep_metrics_MetricPoint_descriptor;
}
@java.lang.Override
protected lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.lightstep.tracer.grpc.Metrics.internal_static_lightstep_metrics_MetricPoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.lightstep.tracer.grpc.MetricPoint.class, com.lightstep.tracer.grpc.MetricPoint.Builder.class);
}
private int bitField0_;
private int valueCase_ = 0;
private java.lang.Object value_;
public enum ValueCase
implements lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Internal.EnumLite {
UINT64_VALUE(6),
DOUBLE_VALUE(7),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) {
case 6: return UINT64_VALUE;
case 7: return DOUBLE_VALUE;
case 0: return VALUE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public static final int KIND_FIELD_NUMBER = 1;
private int kind_;
/**
*
* Kind indicates the semantics of this point. Kind should always be the same for a given metric
* name (e.g. "cpu.usage" should always have the same kind)
*
*
* .lightstep.metrics.MetricKind kind = 1;
*/
public int getKindValue() {
return kind_;
}
/**
*
* Kind indicates the semantics of this point. Kind should always be the same for a given metric
* name (e.g. "cpu.usage" should always have the same kind)
*
*
* .lightstep.metrics.MetricKind kind = 1;
*/
public com.lightstep.tracer.grpc.MetricKind getKind() {
@SuppressWarnings("deprecation")
com.lightstep.tracer.grpc.MetricKind result = com.lightstep.tracer.grpc.MetricKind.valueOf(kind_);
return result == null ? com.lightstep.tracer.grpc.MetricKind.UNRECOGNIZED : result;
}
public static final int METRIC_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object metricName_;
/**
*
* MetricName indicates the metric being emitted.
*
*
* string metric_name = 2;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs =
(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
metricName_ = s;
return s;
}
}
/**
*
* MetricName indicates the metric being emitted.
*
*
* string metric_name = 2;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString
getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof java.lang.String) {
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b =
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref;
}
}
public static final int START_FIELD_NUMBER = 3;
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp start_;
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public boolean hasStart() {
return start_ != null;
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp getStart() {
return start_ == null ? lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.getDefaultInstance() : start_;
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.TimestampOrBuilder getStartOrBuilder() {
return getStart();
}
public static final int DURATION_FIELD_NUMBER = 4;
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration duration_;
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public boolean hasDuration() {
return duration_ != null;
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration getDuration() {
return duration_ == null ? lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.getDefaultInstance() : duration_;
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
return getDuration();
}
public static final int LABELS_FIELD_NUMBER = 5;
private java.util.List labels_;
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public java.util.List getLabelsList() {
return labels_;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public java.util.List extends com.lightstep.tracer.grpc.KeyValueOrBuilder>
getLabelsOrBuilderList() {
return labels_;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public int getLabelsCount() {
return labels_.size();
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public com.lightstep.tracer.grpc.KeyValue getLabels(int index) {
return labels_.get(index);
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public com.lightstep.tracer.grpc.KeyValueOrBuilder getLabelsOrBuilder(
int index) {
return labels_.get(index);
}
public static final int UINT64_VALUE_FIELD_NUMBER = 6;
/**
* uint64 uint64_value = 6;
*/
public long getUint64Value() {
if (valueCase_ == 6) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int DOUBLE_VALUE_FIELD_NUMBER = 7;
/**
* double double_value = 7;
*/
public double getDoubleValue() {
if (valueCase_ == 7) {
return (java.lang.Double) value_;
}
return 0D;
}
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(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (kind_ != com.lightstep.tracer.grpc.MetricKind.INVALID_METRIC_KIND.getNumber()) {
output.writeEnum(1, kind_);
}
if (!getMetricNameBytes().isEmpty()) {
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.writeString(output, 2, metricName_);
}
if (start_ != null) {
output.writeMessage(3, getStart());
}
if (duration_ != null) {
output.writeMessage(4, getDuration());
}
for (int i = 0; i < labels_.size(); i++) {
output.writeMessage(5, labels_.get(i));
}
if (valueCase_ == 6) {
output.writeUInt64(
6, (long)((java.lang.Long) value_));
}
if (valueCase_ == 7) {
output.writeDouble(
7, (double)((java.lang.Double) value_));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (kind_ != com.lightstep.tracer.grpc.MetricKind.INVALID_METRIC_KIND.getNumber()) {
size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream
.computeEnumSize(1, kind_);
}
if (!getMetricNameBytes().isEmpty()) {
size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.computeStringSize(2, metricName_);
}
if (start_ != null) {
size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream
.computeMessageSize(3, getStart());
}
if (duration_ != null) {
size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream
.computeMessageSize(4, getDuration());
}
for (int i = 0; i < labels_.size(); i++) {
size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream
.computeMessageSize(5, labels_.get(i));
}
if (valueCase_ == 6) {
size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream
.computeUInt64Size(
6, (long)((java.lang.Long) value_));
}
if (valueCase_ == 7) {
size += lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedOutputStream
.computeDoubleSize(
7, (double)((java.lang.Double) value_));
}
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 com.lightstep.tracer.grpc.MetricPoint)) {
return super.equals(obj);
}
com.lightstep.tracer.grpc.MetricPoint other = (com.lightstep.tracer.grpc.MetricPoint) obj;
if (kind_ != other.kind_) return false;
if (!getMetricName()
.equals(other.getMetricName())) return false;
if (hasStart() != other.hasStart()) return false;
if (hasStart()) {
if (!getStart()
.equals(other.getStart())) return false;
}
if (hasDuration() != other.hasDuration()) return false;
if (hasDuration()) {
if (!getDuration()
.equals(other.getDuration())) return false;
}
if (!getLabelsList()
.equals(other.getLabelsList())) return false;
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 6:
if (getUint64Value()
!= other.getUint64Value()) return false;
break;
case 7:
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(
other.getDoubleValue())) return false;
break;
case 0:
default:
}
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) + KIND_FIELD_NUMBER;
hash = (53 * hash) + kind_;
hash = (37 * hash) + METRIC_NAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
if (hasStart()) {
hash = (37 * hash) + START_FIELD_NUMBER;
hash = (53 * hash) + getStart().hashCode();
}
if (hasDuration()) {
hash = (37 * hash) + DURATION_FIELD_NUMBER;
hash = (53 * hash) + getDuration().hashCode();
}
if (getLabelsCount() > 0) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + getLabelsList().hashCode();
}
switch (valueCase_) {
case 6:
hash = (37 * hash) + UINT64_VALUE_FIELD_NUMBER;
hash = (53 * hash) + lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Internal.hashLong(
getUint64Value());
break;
case 7:
hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
java.nio.ByteBuffer data)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
java.nio.ByteBuffer data,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString data)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString data,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(byte[] data)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
byte[] data,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(java.io.InputStream input)
throws java.io.IOException {
return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
java.io.InputStream input,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.lightstep.tracer.grpc.MetricPoint parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.lightstep.tracer.grpc.MetricPoint parseDelimitedFrom(
java.io.InputStream input,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.lightstep.tracer.grpc.MetricPoint parseFrom(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return lightstep.com.lightstep.lightstep.lightstep.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(com.lightstep.tracer.grpc.MetricPoint 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(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* MetricPoint is an update to a single measure.
*
*
* Protobuf type {@code lightstep.metrics.MetricPoint}
*/
public static final class Builder extends
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:lightstep.metrics.MetricPoint)
com.lightstep.tracer.grpc.MetricPointOrBuilder {
public static final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.lightstep.tracer.grpc.Metrics.internal_static_lightstep_metrics_MetricPoint_descriptor;
}
@java.lang.Override
protected lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.lightstep.tracer.grpc.Metrics.internal_static_lightstep_metrics_MetricPoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.lightstep.tracer.grpc.MetricPoint.class, com.lightstep.tracer.grpc.MetricPoint.Builder.class);
}
// Construct using com.lightstep.tracer.grpc.MetricPoint.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLabelsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
kind_ = 0;
metricName_ = "";
if (startBuilder_ == null) {
start_ = null;
} else {
start_ = null;
startBuilder_ = null;
}
if (durationBuilder_ == null) {
duration_ = null;
} else {
duration_ = null;
durationBuilder_ = null;
}
if (labelsBuilder_ == null) {
labels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
labelsBuilder_.clear();
}
valueCase_ = 0;
value_ = null;
return this;
}
@java.lang.Override
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.lightstep.tracer.grpc.Metrics.internal_static_lightstep_metrics_MetricPoint_descriptor;
}
@java.lang.Override
public com.lightstep.tracer.grpc.MetricPoint getDefaultInstanceForType() {
return com.lightstep.tracer.grpc.MetricPoint.getDefaultInstance();
}
@java.lang.Override
public com.lightstep.tracer.grpc.MetricPoint build() {
com.lightstep.tracer.grpc.MetricPoint result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.lightstep.tracer.grpc.MetricPoint buildPartial() {
com.lightstep.tracer.grpc.MetricPoint result = new com.lightstep.tracer.grpc.MetricPoint(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.kind_ = kind_;
result.metricName_ = metricName_;
if (startBuilder_ == null) {
result.start_ = start_;
} else {
result.start_ = startBuilder_.build();
}
if (durationBuilder_ == null) {
result.duration_ = duration_;
} else {
result.duration_ = durationBuilder_.build();
}
if (labelsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
labels_ = java.util.Collections.unmodifiableList(labels_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.labels_ = labels_;
} else {
result.labels_ = labelsBuilder_.build();
}
if (valueCase_ == 6) {
result.value_ = value_;
}
if (valueCase_ == 7) {
result.value_ = value_;
}
result.bitField0_ = to_bitField0_;
result.valueCase_ = valueCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Message other) {
if (other instanceof com.lightstep.tracer.grpc.MetricPoint) {
return mergeFrom((com.lightstep.tracer.grpc.MetricPoint)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.lightstep.tracer.grpc.MetricPoint other) {
if (other == com.lightstep.tracer.grpc.MetricPoint.getDefaultInstance()) return this;
if (other.kind_ != 0) {
setKindValue(other.getKindValue());
}
if (!other.getMetricName().isEmpty()) {
metricName_ = other.metricName_;
onChanged();
}
if (other.hasStart()) {
mergeStart(other.getStart());
}
if (other.hasDuration()) {
mergeDuration(other.getDuration());
}
if (labelsBuilder_ == null) {
if (!other.labels_.isEmpty()) {
if (labels_.isEmpty()) {
labels_ = other.labels_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureLabelsIsMutable();
labels_.addAll(other.labels_);
}
onChanged();
}
} else {
if (!other.labels_.isEmpty()) {
if (labelsBuilder_.isEmpty()) {
labelsBuilder_.dispose();
labelsBuilder_ = null;
labels_ = other.labels_;
bitField0_ = (bitField0_ & ~0x00000010);
labelsBuilder_ =
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLabelsFieldBuilder() : null;
} else {
labelsBuilder_.addAllMessages(other.labels_);
}
}
}
switch (other.getValueCase()) {
case UINT64_VALUE: {
setUint64Value(other.getUint64Value());
break;
}
case DOUBLE_VALUE: {
setDoubleValue(other.getDoubleValue());
break;
}
case VALUE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.lightstep.tracer.grpc.MetricPoint parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.lightstep.tracer.grpc.MetricPoint) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int valueCase_ = 0;
private java.lang.Object value_;
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public Builder clearValue() {
valueCase_ = 0;
value_ = null;
onChanged();
return this;
}
private int bitField0_;
private int kind_ = 0;
/**
*
* Kind indicates the semantics of this point. Kind should always be the same for a given metric
* name (e.g. "cpu.usage" should always have the same kind)
*
*
* .lightstep.metrics.MetricKind kind = 1;
*/
public int getKindValue() {
return kind_;
}
/**
*
* Kind indicates the semantics of this point. Kind should always be the same for a given metric
* name (e.g. "cpu.usage" should always have the same kind)
*
*
* .lightstep.metrics.MetricKind kind = 1;
*/
public Builder setKindValue(int value) {
kind_ = value;
onChanged();
return this;
}
/**
*
* Kind indicates the semantics of this point. Kind should always be the same for a given metric
* name (e.g. "cpu.usage" should always have the same kind)
*
*
* .lightstep.metrics.MetricKind kind = 1;
*/
public com.lightstep.tracer.grpc.MetricKind getKind() {
@SuppressWarnings("deprecation")
com.lightstep.tracer.grpc.MetricKind result = com.lightstep.tracer.grpc.MetricKind.valueOf(kind_);
return result == null ? com.lightstep.tracer.grpc.MetricKind.UNRECOGNIZED : result;
}
/**
*
* Kind indicates the semantics of this point. Kind should always be the same for a given metric
* name (e.g. "cpu.usage" should always have the same kind)
*
*
* .lightstep.metrics.MetricKind kind = 1;
*/
public Builder setKind(com.lightstep.tracer.grpc.MetricKind value) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Kind indicates the semantics of this point. Kind should always be the same for a given metric
* name (e.g. "cpu.usage" should always have the same kind)
*
*
* .lightstep.metrics.MetricKind kind = 1;
*/
public Builder clearKind() {
kind_ = 0;
onChanged();
return this;
}
private java.lang.Object metricName_ = "";
/**
*
* MetricName indicates the metric being emitted.
*
*
* string metric_name = 2;
*/
public java.lang.String getMetricName() {
java.lang.Object ref = metricName_;
if (!(ref instanceof java.lang.String)) {
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString bs =
(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
metricName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* MetricName indicates the metric being emitted.
*
*
* string metric_name = 2;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString
getMetricNameBytes() {
java.lang.Object ref = metricName_;
if (ref instanceof String) {
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString b =
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
metricName_ = b;
return b;
} else {
return (lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString) ref;
}
}
/**
*
* MetricName indicates the metric being emitted.
*
*
* string metric_name = 2;
*/
public Builder setMetricName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
metricName_ = value;
onChanged();
return this;
}
/**
*
* MetricName indicates the metric being emitted.
*
*
* string metric_name = 2;
*/
public Builder clearMetricName() {
metricName_ = getDefaultInstance().getMetricName();
onChanged();
return this;
}
/**
*
* MetricName indicates the metric being emitted.
*
*
* string metric_name = 2;
*/
public Builder setMetricNameBytes(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
metricName_ = value;
onChanged();
return this;
}
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp start_;
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.SingleFieldBuilderV3<
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.Builder, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.TimestampOrBuilder> startBuilder_;
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public boolean hasStart() {
return startBuilder_ != null || start_ != null;
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp getStart() {
if (startBuilder_ == null) {
return start_ == null ? lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.getDefaultInstance() : start_;
} else {
return startBuilder_.getMessage();
}
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public Builder setStart(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp value) {
if (startBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
start_ = value;
onChanged();
} else {
startBuilder_.setMessage(value);
}
return this;
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public Builder setStart(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.Builder builderForValue) {
if (startBuilder_ == null) {
start_ = builderForValue.build();
onChanged();
} else {
startBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public Builder mergeStart(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp value) {
if (startBuilder_ == null) {
if (start_ != null) {
start_ =
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.newBuilder(start_).mergeFrom(value).buildPartial();
} else {
start_ = value;
}
onChanged();
} else {
startBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public Builder clearStart() {
if (startBuilder_ == null) {
start_ = null;
onChanged();
} else {
start_ = null;
startBuilder_ = null;
}
return this;
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.Builder getStartBuilder() {
onChanged();
return getStartFieldBuilder().getBuilder();
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.TimestampOrBuilder getStartOrBuilder() {
if (startBuilder_ != null) {
return startBuilder_.getMessageOrBuilder();
} else {
return start_ == null ?
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.getDefaultInstance() : start_;
}
}
/**
*
* Start of the interval for which the points represent.
* - All Counter points will be assumed to represent the entire interval.
* - All Gauge points will be assumed to be instantaneous at the start of the interval.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Timestamp start = 3;
*/
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.SingleFieldBuilderV3<
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.Builder, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.TimestampOrBuilder>
getStartFieldBuilder() {
if (startBuilder_ == null) {
startBuilder_ = new lightstep.com.lightstep.lightstep.lightstep.google.protobuf.SingleFieldBuilderV3<
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Timestamp.Builder, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.TimestampOrBuilder>(
getStart(),
getParentForChildren(),
isClean());
start_ = null;
}
return startBuilder_;
}
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration duration_;
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.SingleFieldBuilderV3<
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.Builder, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.DurationOrBuilder> durationBuilder_;
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public boolean hasDuration() {
return durationBuilder_ != null || duration_ != null;
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration getDuration() {
if (durationBuilder_ == null) {
return duration_ == null ? lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.getDefaultInstance() : duration_;
} else {
return durationBuilder_.getMessage();
}
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public Builder setDuration(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration value) {
if (durationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
duration_ = value;
onChanged();
} else {
durationBuilder_.setMessage(value);
}
return this;
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public Builder setDuration(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.Builder builderForValue) {
if (durationBuilder_ == null) {
duration_ = builderForValue.build();
onChanged();
} else {
durationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public Builder mergeDuration(lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration value) {
if (durationBuilder_ == null) {
if (duration_ != null) {
duration_ =
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.newBuilder(duration_).mergeFrom(value).buildPartial();
} else {
duration_ = value;
}
onChanged();
} else {
durationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public Builder clearDuration() {
if (durationBuilder_ == null) {
duration_ = null;
onChanged();
} else {
duration_ = null;
durationBuilder_ = null;
}
return this;
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.Builder getDurationBuilder() {
onChanged();
return getDurationFieldBuilder().getBuilder();
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.DurationOrBuilder getDurationOrBuilder() {
if (durationBuilder_ != null) {
return durationBuilder_.getMessageOrBuilder();
} else {
return duration_ == null ?
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.getDefaultInstance() : duration_;
}
}
/**
*
* Duration of the interval for which the points represent. The end of the interval is start + duration.
* We expect this value to be unset or zero for Gauge points.
*
*
* .lightstep.lightstep.lightstep.google.protobuf.Duration duration = 4;
*/
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.SingleFieldBuilderV3<
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.Builder, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.DurationOrBuilder>
getDurationFieldBuilder() {
if (durationBuilder_ == null) {
durationBuilder_ = new lightstep.com.lightstep.lightstep.lightstep.google.protobuf.SingleFieldBuilderV3<
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Duration.Builder, lightstep.com.lightstep.lightstep.lightstep.google.protobuf.DurationOrBuilder>(
getDuration(),
getParentForChildren(),
isClean());
duration_ = null;
}
return durationBuilder_;
}
private java.util.List labels_ =
java.util.Collections.emptyList();
private void ensureLabelsIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
labels_ = new java.util.ArrayList(labels_);
bitField0_ |= 0x00000010;
}
}
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.RepeatedFieldBuilderV3<
com.lightstep.tracer.grpc.KeyValue, com.lightstep.tracer.grpc.KeyValue.Builder, com.lightstep.tracer.grpc.KeyValueOrBuilder> labelsBuilder_;
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public java.util.List getLabelsList() {
if (labelsBuilder_ == null) {
return java.util.Collections.unmodifiableList(labels_);
} else {
return labelsBuilder_.getMessageList();
}
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public int getLabelsCount() {
if (labelsBuilder_ == null) {
return labels_.size();
} else {
return labelsBuilder_.getCount();
}
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public com.lightstep.tracer.grpc.KeyValue getLabels(int index) {
if (labelsBuilder_ == null) {
return labels_.get(index);
} else {
return labelsBuilder_.getMessage(index);
}
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder setLabels(
int index, com.lightstep.tracer.grpc.KeyValue value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.set(index, value);
onChanged();
} else {
labelsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder setLabels(
int index, com.lightstep.tracer.grpc.KeyValue.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.set(index, builderForValue.build());
onChanged();
} else {
labelsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder addLabels(com.lightstep.tracer.grpc.KeyValue value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.add(value);
onChanged();
} else {
labelsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder addLabels(
int index, com.lightstep.tracer.grpc.KeyValue value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.add(index, value);
onChanged();
} else {
labelsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder addLabels(
com.lightstep.tracer.grpc.KeyValue.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.add(builderForValue.build());
onChanged();
} else {
labelsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder addLabels(
int index, com.lightstep.tracer.grpc.KeyValue.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.add(index, builderForValue.build());
onChanged();
} else {
labelsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder addAllLabels(
java.lang.Iterable extends com.lightstep.tracer.grpc.KeyValue> values) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.AbstractMessageLite.Builder.addAll(
values, labels_);
onChanged();
} else {
labelsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder clearLabels() {
if (labelsBuilder_ == null) {
labels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
labelsBuilder_.clear();
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public Builder removeLabels(int index) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.remove(index);
onChanged();
} else {
labelsBuilder_.remove(index);
}
return this;
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public com.lightstep.tracer.grpc.KeyValue.Builder getLabelsBuilder(
int index) {
return getLabelsFieldBuilder().getBuilder(index);
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public com.lightstep.tracer.grpc.KeyValueOrBuilder getLabelsOrBuilder(
int index) {
if (labelsBuilder_ == null) {
return labels_.get(index); } else {
return labelsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public java.util.List extends com.lightstep.tracer.grpc.KeyValueOrBuilder>
getLabelsOrBuilderList() {
if (labelsBuilder_ != null) {
return labelsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(labels_);
}
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public com.lightstep.tracer.grpc.KeyValue.Builder addLabelsBuilder() {
return getLabelsFieldBuilder().addBuilder(
com.lightstep.tracer.grpc.KeyValue.getDefaultInstance());
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public com.lightstep.tracer.grpc.KeyValue.Builder addLabelsBuilder(
int index) {
return getLabelsFieldBuilder().addBuilder(
index, com.lightstep.tracer.grpc.KeyValue.getDefaultInstance());
}
/**
*
* Labels contain labels specific to this point.
*
*
* repeated .lightstep.collector.KeyValue labels = 5;
*/
public java.util.List
getLabelsBuilderList() {
return getLabelsFieldBuilder().getBuilderList();
}
private lightstep.com.lightstep.lightstep.lightstep.google.protobuf.RepeatedFieldBuilderV3<
com.lightstep.tracer.grpc.KeyValue, com.lightstep.tracer.grpc.KeyValue.Builder, com.lightstep.tracer.grpc.KeyValueOrBuilder>
getLabelsFieldBuilder() {
if (labelsBuilder_ == null) {
labelsBuilder_ = new lightstep.com.lightstep.lightstep.lightstep.google.protobuf.RepeatedFieldBuilderV3<
com.lightstep.tracer.grpc.KeyValue, com.lightstep.tracer.grpc.KeyValue.Builder, com.lightstep.tracer.grpc.KeyValueOrBuilder>(
labels_,
((bitField0_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
labels_ = null;
}
return labelsBuilder_;
}
/**
* uint64 uint64_value = 6;
*/
public long getUint64Value() {
if (valueCase_ == 6) {
return (java.lang.Long) value_;
}
return 0L;
}
/**
* uint64 uint64_value = 6;
*/
public Builder setUint64Value(long value) {
valueCase_ = 6;
value_ = value;
onChanged();
return this;
}
/**
* uint64 uint64_value = 6;
*/
public Builder clearUint64Value() {
if (valueCase_ == 6) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* double double_value = 7;
*/
public double getDoubleValue() {
if (valueCase_ == 7) {
return (java.lang.Double) value_;
}
return 0D;
}
/**
* double double_value = 7;
*/
public Builder setDoubleValue(double value) {
valueCase_ = 7;
value_ = value;
onChanged();
return this;
}
/**
* double double_value = 7;
*/
public Builder clearDoubleValue() {
if (valueCase_ == 7) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:lightstep.metrics.MetricPoint)
}
// @@protoc_insertion_point(class_scope:lightstep.metrics.MetricPoint)
private static final com.lightstep.tracer.grpc.MetricPoint DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.lightstep.tracer.grpc.MetricPoint();
}
public static com.lightstep.tracer.grpc.MetricPoint getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Parser
PARSER = new lightstep.com.lightstep.lightstep.lightstep.google.protobuf.AbstractParser() {
@java.lang.Override
public MetricPoint parsePartialFrom(
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.CodedInputStream input,
lightstep.com.lightstep.lightstep.lightstep.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws lightstep.com.lightstep.lightstep.lightstep.google.protobuf.InvalidProtocolBufferException {
return new MetricPoint(input, extensionRegistry);
}
};
public static lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public lightstep.com.lightstep.lightstep.lightstep.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.lightstep.tracer.grpc.MetricPoint getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy