
io.opentelemetry.proto.metrics.v1.Exemplar Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: opentelemetry/proto/metrics/v1/metrics.proto
// Protobuf Java Version: 3.25.1
package io.opentelemetry.proto.metrics.v1;
/**
*
* A representation of an exemplar, which is a sample input measurement.
* Exemplars also hold information about the environment when the measurement
* was recorded, for example the span and trace ID of the active span when the
* exemplar was recorded.
*
*
* Protobuf type {@code opentelemetry.proto.metrics.v1.Exemplar}
*/
public final class Exemplar extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opentelemetry.proto.metrics.v1.Exemplar)
ExemplarOrBuilder {
private static final long serialVersionUID = 0L;
// Use Exemplar.newBuilder() to construct.
private Exemplar(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Exemplar() {
filteredAttributes_ = java.util.Collections.emptyList();
spanId_ = com.google.protobuf.ByteString.EMPTY;
traceId_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Exemplar();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Exemplar_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Exemplar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opentelemetry.proto.metrics.v1.Exemplar.class, io.opentelemetry.proto.metrics.v1.Exemplar.Builder.class);
}
private int valueCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object value_;
public enum ValueCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
AS_DOUBLE(3),
AS_INT(6),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @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 3: return AS_DOUBLE;
case 6: return AS_INT;
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 FILTERED_ATTRIBUTES_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List filteredAttributes_;
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
@java.lang.Override
public java.util.List getFilteredAttributesList() {
return filteredAttributes_;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
@java.lang.Override
public java.util.List extends io.opentelemetry.proto.common.v1.KeyValueOrBuilder>
getFilteredAttributesOrBuilderList() {
return filteredAttributes_;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
@java.lang.Override
public int getFilteredAttributesCount() {
return filteredAttributes_.size();
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
@java.lang.Override
public io.opentelemetry.proto.common.v1.KeyValue getFilteredAttributes(int index) {
return filteredAttributes_.get(index);
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
@java.lang.Override
public io.opentelemetry.proto.common.v1.KeyValueOrBuilder getFilteredAttributesOrBuilder(
int index) {
return filteredAttributes_.get(index);
}
public static final int TIME_UNIX_NANO_FIELD_NUMBER = 2;
private long timeUnixNano_ = 0L;
/**
*
* time_unix_nano is the exact time when this exemplar was recorded
*
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
* 1970.
*
*
* fixed64 time_unix_nano = 2;
* @return The timeUnixNano.
*/
@java.lang.Override
public long getTimeUnixNano() {
return timeUnixNano_;
}
public static final int AS_DOUBLE_FIELD_NUMBER = 3;
/**
* double as_double = 3;
* @return Whether the asDouble field is set.
*/
@java.lang.Override
public boolean hasAsDouble() {
return valueCase_ == 3;
}
/**
* double as_double = 3;
* @return The asDouble.
*/
@java.lang.Override
public double getAsDouble() {
if (valueCase_ == 3) {
return (java.lang.Double) value_;
}
return 0D;
}
public static final int AS_INT_FIELD_NUMBER = 6;
/**
* sfixed64 as_int = 6;
* @return Whether the asInt field is set.
*/
@java.lang.Override
public boolean hasAsInt() {
return valueCase_ == 6;
}
/**
* sfixed64 as_int = 6;
* @return The asInt.
*/
@java.lang.Override
public long getAsInt() {
if (valueCase_ == 6) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int SPAN_ID_FIELD_NUMBER = 4;
private com.google.protobuf.ByteString spanId_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* (Optional) Span ID of the exemplar trace.
* span_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes span_id = 4;
* @return The spanId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSpanId() {
return spanId_;
}
public static final int TRACE_ID_FIELD_NUMBER = 5;
private com.google.protobuf.ByteString traceId_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* (Optional) Trace ID of the exemplar trace.
* trace_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes trace_id = 5;
* @return The traceId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTraceId() {
return traceId_;
}
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(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (timeUnixNano_ != 0L) {
output.writeFixed64(2, timeUnixNano_);
}
if (valueCase_ == 3) {
output.writeDouble(
3, (double)((java.lang.Double) value_));
}
if (!spanId_.isEmpty()) {
output.writeBytes(4, spanId_);
}
if (!traceId_.isEmpty()) {
output.writeBytes(5, traceId_);
}
if (valueCase_ == 6) {
output.writeSFixed64(
6, (long)((java.lang.Long) value_));
}
for (int i = 0; i < filteredAttributes_.size(); i++) {
output.writeMessage(7, filteredAttributes_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (timeUnixNano_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeFixed64Size(2, timeUnixNano_);
}
if (valueCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
3, (double)((java.lang.Double) value_));
}
if (!spanId_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, spanId_);
}
if (!traceId_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(5, traceId_);
}
if (valueCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeSFixed64Size(
6, (long)((java.lang.Long) value_));
}
for (int i = 0; i < filteredAttributes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, filteredAttributes_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.opentelemetry.proto.metrics.v1.Exemplar)) {
return super.equals(obj);
}
io.opentelemetry.proto.metrics.v1.Exemplar other = (io.opentelemetry.proto.metrics.v1.Exemplar) obj;
if (!getFilteredAttributesList()
.equals(other.getFilteredAttributesList())) return false;
if (getTimeUnixNano()
!= other.getTimeUnixNano()) return false;
if (!getSpanId()
.equals(other.getSpanId())) return false;
if (!getTraceId()
.equals(other.getTraceId())) return false;
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 3:
if (java.lang.Double.doubleToLongBits(getAsDouble())
!= java.lang.Double.doubleToLongBits(
other.getAsDouble())) return false;
break;
case 6:
if (getAsInt()
!= other.getAsInt()) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getFilteredAttributesCount() > 0) {
hash = (37 * hash) + FILTERED_ATTRIBUTES_FIELD_NUMBER;
hash = (53 * hash) + getFilteredAttributesList().hashCode();
}
hash = (37 * hash) + TIME_UNIX_NANO_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimeUnixNano());
hash = (37 * hash) + SPAN_ID_FIELD_NUMBER;
hash = (53 * hash) + getSpanId().hashCode();
hash = (37 * hash) + TRACE_ID_FIELD_NUMBER;
hash = (53 * hash) + getTraceId().hashCode();
switch (valueCase_) {
case 3:
hash = (37 * hash) + AS_DOUBLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getAsDouble()));
break;
case 6:
hash = (37 * hash) + AS_INT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getAsInt());
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opentelemetry.proto.metrics.v1.Exemplar parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return 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(io.opentelemetry.proto.metrics.v1.Exemplar 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(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A representation of an exemplar, which is a sample input measurement.
* Exemplars also hold information about the environment when the measurement
* was recorded, for example the span and trace ID of the active span when the
* exemplar was recorded.
*
*
* Protobuf type {@code opentelemetry.proto.metrics.v1.Exemplar}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opentelemetry.proto.metrics.v1.Exemplar)
io.opentelemetry.proto.metrics.v1.ExemplarOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Exemplar_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Exemplar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opentelemetry.proto.metrics.v1.Exemplar.class, io.opentelemetry.proto.metrics.v1.Exemplar.Builder.class);
}
// Construct using io.opentelemetry.proto.metrics.v1.Exemplar.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (filteredAttributesBuilder_ == null) {
filteredAttributes_ = java.util.Collections.emptyList();
} else {
filteredAttributes_ = null;
filteredAttributesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
timeUnixNano_ = 0L;
spanId_ = com.google.protobuf.ByteString.EMPTY;
traceId_ = com.google.protobuf.ByteString.EMPTY;
valueCase_ = 0;
value_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Exemplar_descriptor;
}
@java.lang.Override
public io.opentelemetry.proto.metrics.v1.Exemplar getDefaultInstanceForType() {
return io.opentelemetry.proto.metrics.v1.Exemplar.getDefaultInstance();
}
@java.lang.Override
public io.opentelemetry.proto.metrics.v1.Exemplar build() {
io.opentelemetry.proto.metrics.v1.Exemplar result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opentelemetry.proto.metrics.v1.Exemplar buildPartial() {
io.opentelemetry.proto.metrics.v1.Exemplar result = new io.opentelemetry.proto.metrics.v1.Exemplar(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(io.opentelemetry.proto.metrics.v1.Exemplar result) {
if (filteredAttributesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
filteredAttributes_ = java.util.Collections.unmodifiableList(filteredAttributes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.filteredAttributes_ = filteredAttributes_;
} else {
result.filteredAttributes_ = filteredAttributesBuilder_.build();
}
}
private void buildPartial0(io.opentelemetry.proto.metrics.v1.Exemplar result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.timeUnixNano_ = timeUnixNano_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.spanId_ = spanId_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.traceId_ = traceId_;
}
}
private void buildPartialOneofs(io.opentelemetry.proto.metrics.v1.Exemplar result) {
result.valueCase_ = valueCase_;
result.value_ = this.value_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.opentelemetry.proto.metrics.v1.Exemplar) {
return mergeFrom((io.opentelemetry.proto.metrics.v1.Exemplar)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opentelemetry.proto.metrics.v1.Exemplar other) {
if (other == io.opentelemetry.proto.metrics.v1.Exemplar.getDefaultInstance()) return this;
if (filteredAttributesBuilder_ == null) {
if (!other.filteredAttributes_.isEmpty()) {
if (filteredAttributes_.isEmpty()) {
filteredAttributes_ = other.filteredAttributes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureFilteredAttributesIsMutable();
filteredAttributes_.addAll(other.filteredAttributes_);
}
onChanged();
}
} else {
if (!other.filteredAttributes_.isEmpty()) {
if (filteredAttributesBuilder_.isEmpty()) {
filteredAttributesBuilder_.dispose();
filteredAttributesBuilder_ = null;
filteredAttributes_ = other.filteredAttributes_;
bitField0_ = (bitField0_ & ~0x00000001);
filteredAttributesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFilteredAttributesFieldBuilder() : null;
} else {
filteredAttributesBuilder_.addAllMessages(other.filteredAttributes_);
}
}
}
if (other.getTimeUnixNano() != 0L) {
setTimeUnixNano(other.getTimeUnixNano());
}
if (other.getSpanId() != com.google.protobuf.ByteString.EMPTY) {
setSpanId(other.getSpanId());
}
if (other.getTraceId() != com.google.protobuf.ByteString.EMPTY) {
setTraceId(other.getTraceId());
}
switch (other.getValueCase()) {
case AS_DOUBLE: {
setAsDouble(other.getAsDouble());
break;
}
case AS_INT: {
setAsInt(other.getAsInt());
break;
}
case VALUE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 17: {
timeUnixNano_ = input.readFixed64();
bitField0_ |= 0x00000002;
break;
} // case 17
case 25: {
value_ = input.readDouble();
valueCase_ = 3;
break;
} // case 25
case 34: {
spanId_ = input.readBytes();
bitField0_ |= 0x00000010;
break;
} // case 34
case 42: {
traceId_ = input.readBytes();
bitField0_ |= 0x00000020;
break;
} // case 42
case 49: {
value_ = input.readSFixed64();
valueCase_ = 6;
break;
} // case 49
case 58: {
io.opentelemetry.proto.common.v1.KeyValue m =
input.readMessage(
io.opentelemetry.proto.common.v1.KeyValue.parser(),
extensionRegistry);
if (filteredAttributesBuilder_ == null) {
ensureFilteredAttributesIsMutable();
filteredAttributes_.add(m);
} else {
filteredAttributesBuilder_.addMessage(m);
}
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
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 java.util.List filteredAttributes_ =
java.util.Collections.emptyList();
private void ensureFilteredAttributesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
filteredAttributes_ = new java.util.ArrayList(filteredAttributes_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opentelemetry.proto.common.v1.KeyValue, io.opentelemetry.proto.common.v1.KeyValue.Builder, io.opentelemetry.proto.common.v1.KeyValueOrBuilder> filteredAttributesBuilder_;
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public java.util.List getFilteredAttributesList() {
if (filteredAttributesBuilder_ == null) {
return java.util.Collections.unmodifiableList(filteredAttributes_);
} else {
return filteredAttributesBuilder_.getMessageList();
}
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public int getFilteredAttributesCount() {
if (filteredAttributesBuilder_ == null) {
return filteredAttributes_.size();
} else {
return filteredAttributesBuilder_.getCount();
}
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public io.opentelemetry.proto.common.v1.KeyValue getFilteredAttributes(int index) {
if (filteredAttributesBuilder_ == null) {
return filteredAttributes_.get(index);
} else {
return filteredAttributesBuilder_.getMessage(index);
}
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder setFilteredAttributes(
int index, io.opentelemetry.proto.common.v1.KeyValue value) {
if (filteredAttributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFilteredAttributesIsMutable();
filteredAttributes_.set(index, value);
onChanged();
} else {
filteredAttributesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder setFilteredAttributes(
int index, io.opentelemetry.proto.common.v1.KeyValue.Builder builderForValue) {
if (filteredAttributesBuilder_ == null) {
ensureFilteredAttributesIsMutable();
filteredAttributes_.set(index, builderForValue.build());
onChanged();
} else {
filteredAttributesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder addFilteredAttributes(io.opentelemetry.proto.common.v1.KeyValue value) {
if (filteredAttributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFilteredAttributesIsMutable();
filteredAttributes_.add(value);
onChanged();
} else {
filteredAttributesBuilder_.addMessage(value);
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder addFilteredAttributes(
int index, io.opentelemetry.proto.common.v1.KeyValue value) {
if (filteredAttributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFilteredAttributesIsMutable();
filteredAttributes_.add(index, value);
onChanged();
} else {
filteredAttributesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder addFilteredAttributes(
io.opentelemetry.proto.common.v1.KeyValue.Builder builderForValue) {
if (filteredAttributesBuilder_ == null) {
ensureFilteredAttributesIsMutable();
filteredAttributes_.add(builderForValue.build());
onChanged();
} else {
filteredAttributesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder addFilteredAttributes(
int index, io.opentelemetry.proto.common.v1.KeyValue.Builder builderForValue) {
if (filteredAttributesBuilder_ == null) {
ensureFilteredAttributesIsMutable();
filteredAttributes_.add(index, builderForValue.build());
onChanged();
} else {
filteredAttributesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder addAllFilteredAttributes(
java.lang.Iterable extends io.opentelemetry.proto.common.v1.KeyValue> values) {
if (filteredAttributesBuilder_ == null) {
ensureFilteredAttributesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, filteredAttributes_);
onChanged();
} else {
filteredAttributesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder clearFilteredAttributes() {
if (filteredAttributesBuilder_ == null) {
filteredAttributes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
filteredAttributesBuilder_.clear();
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public Builder removeFilteredAttributes(int index) {
if (filteredAttributesBuilder_ == null) {
ensureFilteredAttributesIsMutable();
filteredAttributes_.remove(index);
onChanged();
} else {
filteredAttributesBuilder_.remove(index);
}
return this;
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public io.opentelemetry.proto.common.v1.KeyValue.Builder getFilteredAttributesBuilder(
int index) {
return getFilteredAttributesFieldBuilder().getBuilder(index);
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public io.opentelemetry.proto.common.v1.KeyValueOrBuilder getFilteredAttributesOrBuilder(
int index) {
if (filteredAttributesBuilder_ == null) {
return filteredAttributes_.get(index); } else {
return filteredAttributesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public java.util.List extends io.opentelemetry.proto.common.v1.KeyValueOrBuilder>
getFilteredAttributesOrBuilderList() {
if (filteredAttributesBuilder_ != null) {
return filteredAttributesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(filteredAttributes_);
}
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public io.opentelemetry.proto.common.v1.KeyValue.Builder addFilteredAttributesBuilder() {
return getFilteredAttributesFieldBuilder().addBuilder(
io.opentelemetry.proto.common.v1.KeyValue.getDefaultInstance());
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public io.opentelemetry.proto.common.v1.KeyValue.Builder addFilteredAttributesBuilder(
int index) {
return getFilteredAttributesFieldBuilder().addBuilder(
index, io.opentelemetry.proto.common.v1.KeyValue.getDefaultInstance());
}
/**
*
* The set of key/value pairs that were filtered out by the aggregator, but
* recorded alongside the original measurement. Only key/value pairs that were
* filtered out by the aggregator should be included
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
*/
public java.util.List
getFilteredAttributesBuilderList() {
return getFilteredAttributesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opentelemetry.proto.common.v1.KeyValue, io.opentelemetry.proto.common.v1.KeyValue.Builder, io.opentelemetry.proto.common.v1.KeyValueOrBuilder>
getFilteredAttributesFieldBuilder() {
if (filteredAttributesBuilder_ == null) {
filteredAttributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opentelemetry.proto.common.v1.KeyValue, io.opentelemetry.proto.common.v1.KeyValue.Builder, io.opentelemetry.proto.common.v1.KeyValueOrBuilder>(
filteredAttributes_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
filteredAttributes_ = null;
}
return filteredAttributesBuilder_;
}
private long timeUnixNano_ ;
/**
*
* time_unix_nano is the exact time when this exemplar was recorded
*
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
* 1970.
*
*
* fixed64 time_unix_nano = 2;
* @return The timeUnixNano.
*/
@java.lang.Override
public long getTimeUnixNano() {
return timeUnixNano_;
}
/**
*
* time_unix_nano is the exact time when this exemplar was recorded
*
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
* 1970.
*
*
* fixed64 time_unix_nano = 2;
* @param value The timeUnixNano to set.
* @return This builder for chaining.
*/
public Builder setTimeUnixNano(long value) {
timeUnixNano_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* time_unix_nano is the exact time when this exemplar was recorded
*
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
* 1970.
*
*
* fixed64 time_unix_nano = 2;
* @return This builder for chaining.
*/
public Builder clearTimeUnixNano() {
bitField0_ = (bitField0_ & ~0x00000002);
timeUnixNano_ = 0L;
onChanged();
return this;
}
/**
* double as_double = 3;
* @return Whether the asDouble field is set.
*/
public boolean hasAsDouble() {
return valueCase_ == 3;
}
/**
* double as_double = 3;
* @return The asDouble.
*/
public double getAsDouble() {
if (valueCase_ == 3) {
return (java.lang.Double) value_;
}
return 0D;
}
/**
* double as_double = 3;
* @param value The asDouble to set.
* @return This builder for chaining.
*/
public Builder setAsDouble(double value) {
valueCase_ = 3;
value_ = value;
onChanged();
return this;
}
/**
* double as_double = 3;
* @return This builder for chaining.
*/
public Builder clearAsDouble() {
if (valueCase_ == 3) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
/**
* sfixed64 as_int = 6;
* @return Whether the asInt field is set.
*/
public boolean hasAsInt() {
return valueCase_ == 6;
}
/**
* sfixed64 as_int = 6;
* @return The asInt.
*/
public long getAsInt() {
if (valueCase_ == 6) {
return (java.lang.Long) value_;
}
return 0L;
}
/**
* sfixed64 as_int = 6;
* @param value The asInt to set.
* @return This builder for chaining.
*/
public Builder setAsInt(long value) {
valueCase_ = 6;
value_ = value;
onChanged();
return this;
}
/**
* sfixed64 as_int = 6;
* @return This builder for chaining.
*/
public Builder clearAsInt() {
if (valueCase_ == 6) {
valueCase_ = 0;
value_ = null;
onChanged();
}
return this;
}
private com.google.protobuf.ByteString spanId_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* (Optional) Span ID of the exemplar trace.
* span_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes span_id = 4;
* @return The spanId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSpanId() {
return spanId_;
}
/**
*
* (Optional) Span ID of the exemplar trace.
* span_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes span_id = 4;
* @param value The spanId to set.
* @return This builder for chaining.
*/
public Builder setSpanId(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
spanId_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* (Optional) Span ID of the exemplar trace.
* span_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes span_id = 4;
* @return This builder for chaining.
*/
public Builder clearSpanId() {
bitField0_ = (bitField0_ & ~0x00000010);
spanId_ = getDefaultInstance().getSpanId();
onChanged();
return this;
}
private com.google.protobuf.ByteString traceId_ = com.google.protobuf.ByteString.EMPTY;
/**
*
* (Optional) Trace ID of the exemplar trace.
* trace_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes trace_id = 5;
* @return The traceId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTraceId() {
return traceId_;
}
/**
*
* (Optional) Trace ID of the exemplar trace.
* trace_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes trace_id = 5;
* @param value The traceId to set.
* @return This builder for chaining.
*/
public Builder setTraceId(com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
traceId_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* (Optional) Trace ID of the exemplar trace.
* trace_id may be missing if the measurement is not recorded inside a trace
* or if the trace is not sampled.
*
*
* bytes trace_id = 5;
* @return This builder for chaining.
*/
public Builder clearTraceId() {
bitField0_ = (bitField0_ & ~0x00000020);
traceId_ = getDefaultInstance().getTraceId();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opentelemetry.proto.metrics.v1.Exemplar)
}
// @@protoc_insertion_point(class_scope:opentelemetry.proto.metrics.v1.Exemplar)
private static final io.opentelemetry.proto.metrics.v1.Exemplar DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opentelemetry.proto.metrics.v1.Exemplar();
}
public static io.opentelemetry.proto.metrics.v1.Exemplar getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Exemplar parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.opentelemetry.proto.metrics.v1.Exemplar getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy