Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: opentelemetry/proto/logs/v1/logs.proto
package io.opentelemetry.proto.logs.v1;
/**
*
* A log record according to OpenTelemetry Log Data Model:
* https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
*
*
* Protobuf type {@code opentelemetry.proto.logs.v1.LogRecord}
*/
public final class LogRecord extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opentelemetry.proto.logs.v1.LogRecord)
LogRecordOrBuilder {
private static final long serialVersionUID = 0L;
// Use LogRecord.newBuilder() to construct.
private LogRecord(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LogRecord() {
severityNumber_ = 0;
severityText_ = "";
attributes_ = java.util.Collections.emptyList();
traceId_ = com.google.protobuf.ByteString.EMPTY;
spanId_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LogRecord();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LogRecord(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
timeUnixNano_ = input.readFixed64();
break;
}
case 16: {
int rawValue = input.readEnum();
severityNumber_ = rawValue;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
severityText_ = s;
break;
}
case 42: {
io.opentelemetry.proto.common.v1.AnyValue.Builder subBuilder = null;
if (body_ != null) {
subBuilder = body_.toBuilder();
}
body_ = input.readMessage(io.opentelemetry.proto.common.v1.AnyValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(body_);
body_ = subBuilder.buildPartial();
}
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
attributes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
attributes_.add(
input.readMessage(io.opentelemetry.proto.common.v1.KeyValue.parser(), extensionRegistry));
break;
}
case 56: {
droppedAttributesCount_ = input.readUInt32();
break;
}
case 69: {
flags_ = input.readFixed32();
break;
}
case 74: {
traceId_ = input.readBytes();
break;
}
case 82: {
spanId_ = input.readBytes();
break;
}
case 89: {
observedTimeUnixNano_ = input.readFixed64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
attributes_ = java.util.Collections.unmodifiableList(attributes_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opentelemetry.proto.logs.v1.LogsProto.internal_static_opentelemetry_proto_logs_v1_LogRecord_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opentelemetry.proto.logs.v1.LogsProto.internal_static_opentelemetry_proto_logs_v1_LogRecord_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opentelemetry.proto.logs.v1.LogRecord.class, io.opentelemetry.proto.logs.v1.LogRecord.Builder.class);
}
public static final int TIME_UNIX_NANO_FIELD_NUMBER = 1;
private long timeUnixNano_;
/**
*
* time_unix_nano is the time when the event occurred.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 time_unix_nano = 1;
* @return The timeUnixNano.
*/
@java.lang.Override
public long getTimeUnixNano() {
return timeUnixNano_;
}
public static final int OBSERVED_TIME_UNIX_NANO_FIELD_NUMBER = 11;
private long observedTimeUnixNano_;
/**
*
* Time when the event was observed by the collection system.
* For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
* this timestamp is typically set at the generation time and is equal to Timestamp.
* For events originating externally and collected by OpenTelemetry (e.g. using
* Collector) this is the time when OpenTelemetry's code observed the event measured
* by the clock of the OpenTelemetry code. This field MUST be set once the event is
* observed by OpenTelemetry.
* For converting OpenTelemetry log data to formats that support only one timestamp or
* when receiving OpenTelemetry log data by recipients that support only one timestamp
* internally the following logic is recommended:
* - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 observed_time_unix_nano = 11;
* @return The observedTimeUnixNano.
*/
@java.lang.Override
public long getObservedTimeUnixNano() {
return observedTimeUnixNano_;
}
public static final int SEVERITY_NUMBER_FIELD_NUMBER = 2;
private int severityNumber_;
/**
*
* Numerical value of the severity, normalized to values described in Log Data Model.
* [Optional].
*
*
* .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
* @return The enum numeric value on the wire for severityNumber.
*/
@java.lang.Override public int getSeverityNumberValue() {
return severityNumber_;
}
/**
*
* Numerical value of the severity, normalized to values described in Log Data Model.
* [Optional].
*
*
* .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
* @return The severityNumber.
*/
@java.lang.Override public io.opentelemetry.proto.logs.v1.SeverityNumber getSeverityNumber() {
@SuppressWarnings("deprecation")
io.opentelemetry.proto.logs.v1.SeverityNumber result = io.opentelemetry.proto.logs.v1.SeverityNumber.valueOf(severityNumber_);
return result == null ? io.opentelemetry.proto.logs.v1.SeverityNumber.UNRECOGNIZED : result;
}
public static final int SEVERITY_TEXT_FIELD_NUMBER = 3;
private volatile java.lang.Object severityText_;
/**
*
* The severity text (also known as log level). The original string representation as
* it is known at the source. [Optional].
*
* The severity text (also known as log level). The original string representation as
* it is known at the source. [Optional].
*
*
* string severity_text = 3;
* @return The bytes for severityText.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSeverityTextBytes() {
java.lang.Object ref = severityText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
severityText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BODY_FIELD_NUMBER = 5;
private io.opentelemetry.proto.common.v1.AnyValue body_;
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
*
* .opentelemetry.proto.common.v1.AnyValue body = 5;
* @return Whether the body field is set.
*/
@java.lang.Override
public boolean hasBody() {
return body_ != null;
}
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
*
* .opentelemetry.proto.common.v1.AnyValue body = 5;
* @return The body.
*/
@java.lang.Override
public io.opentelemetry.proto.common.v1.AnyValue getBody() {
return body_ == null ? io.opentelemetry.proto.common.v1.AnyValue.getDefaultInstance() : body_;
}
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
*
* .opentelemetry.proto.common.v1.AnyValue body = 5;
*/
@java.lang.Override
public io.opentelemetry.proto.common.v1.AnyValueOrBuilder getBodyOrBuilder() {
return getBody();
}
public static final int ATTRIBUTES_FIELD_NUMBER = 6;
private java.util.List attributes_;
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
@java.lang.Override
public int getAttributesCount() {
return attributes_.size();
}
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
@java.lang.Override
public io.opentelemetry.proto.common.v1.KeyValueOrBuilder getAttributesOrBuilder(
int index) {
return attributes_.get(index);
}
public static final int DROPPED_ATTRIBUTES_COUNT_FIELD_NUMBER = 7;
private int droppedAttributesCount_;
/**
* uint32 dropped_attributes_count = 7;
* @return The droppedAttributesCount.
*/
@java.lang.Override
public int getDroppedAttributesCount() {
return droppedAttributesCount_;
}
public static final int FLAGS_FIELD_NUMBER = 8;
private int flags_;
/**
*
* Flags, a bit field. 8 least significant bits are the trace flags as
* defined in W3C Trace Context specification. 24 most significant bits are reserved
* and must be set to 0. Readers must not assume that 24 most significant bits
* will be zero and must correctly mask the bits when reading 8-bit trace flag (use
* flags & TRACE_FLAGS_MASK). [Optional].
*
*
* fixed32 flags = 8;
* @return The flags.
*/
@java.lang.Override
public int getFlags() {
return flags_;
}
public static final int TRACE_ID_FIELD_NUMBER = 9;
private com.google.protobuf.ByteString traceId_;
/**
*
* A unique identifier for a trace. All logs from the same trace share
* the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
* is considered invalid. Can be set for logs that are part of request processing
* and have an assigned trace id. [Optional].
*
*
* bytes trace_id = 9;
* @return The traceId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTraceId() {
return traceId_;
}
public static final int SPAN_ID_FIELD_NUMBER = 10;
private com.google.protobuf.ByteString spanId_;
/**
*
* A unique identifier for a span within a trace, assigned when the span
* is created. The ID is an 8-byte array. An ID with all zeroes is considered
* invalid. Can be set for logs that are part of a particular processing span.
* If span_id is present trace_id SHOULD be also present. [Optional].
*
* time_unix_nano is the time when the event occurred.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 time_unix_nano = 1;
* @return The timeUnixNano.
*/
@java.lang.Override
public long getTimeUnixNano() {
return timeUnixNano_;
}
/**
*
* time_unix_nano is the time when the event occurred.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 time_unix_nano = 1;
* @param value The timeUnixNano to set.
* @return This builder for chaining.
*/
public Builder setTimeUnixNano(long value) {
timeUnixNano_ = value;
onChanged();
return this;
}
/**
*
* time_unix_nano is the time when the event occurred.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 time_unix_nano = 1;
* @return This builder for chaining.
*/
public Builder clearTimeUnixNano() {
timeUnixNano_ = 0L;
onChanged();
return this;
}
private long observedTimeUnixNano_ ;
/**
*
* Time when the event was observed by the collection system.
* For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
* this timestamp is typically set at the generation time and is equal to Timestamp.
* For events originating externally and collected by OpenTelemetry (e.g. using
* Collector) this is the time when OpenTelemetry's code observed the event measured
* by the clock of the OpenTelemetry code. This field MUST be set once the event is
* observed by OpenTelemetry.
* For converting OpenTelemetry log data to formats that support only one timestamp or
* when receiving OpenTelemetry log data by recipients that support only one timestamp
* internally the following logic is recommended:
* - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 observed_time_unix_nano = 11;
* @return The observedTimeUnixNano.
*/
@java.lang.Override
public long getObservedTimeUnixNano() {
return observedTimeUnixNano_;
}
/**
*
* Time when the event was observed by the collection system.
* For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
* this timestamp is typically set at the generation time and is equal to Timestamp.
* For events originating externally and collected by OpenTelemetry (e.g. using
* Collector) this is the time when OpenTelemetry's code observed the event measured
* by the clock of the OpenTelemetry code. This field MUST be set once the event is
* observed by OpenTelemetry.
* For converting OpenTelemetry log data to formats that support only one timestamp or
* when receiving OpenTelemetry log data by recipients that support only one timestamp
* internally the following logic is recommended:
* - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 observed_time_unix_nano = 11;
* @param value The observedTimeUnixNano to set.
* @return This builder for chaining.
*/
public Builder setObservedTimeUnixNano(long value) {
observedTimeUnixNano_ = value;
onChanged();
return this;
}
/**
*
* Time when the event was observed by the collection system.
* For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
* this timestamp is typically set at the generation time and is equal to Timestamp.
* For events originating externally and collected by OpenTelemetry (e.g. using
* Collector) this is the time when OpenTelemetry's code observed the event measured
* by the clock of the OpenTelemetry code. This field MUST be set once the event is
* observed by OpenTelemetry.
* For converting OpenTelemetry log data to formats that support only one timestamp or
* when receiving OpenTelemetry log data by recipients that support only one timestamp
* internally the following logic is recommended:
* - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
* Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
* Value of 0 indicates unknown or missing timestamp.
*
*
* fixed64 observed_time_unix_nano = 11;
* @return This builder for chaining.
*/
public Builder clearObservedTimeUnixNano() {
observedTimeUnixNano_ = 0L;
onChanged();
return this;
}
private int severityNumber_ = 0;
/**
*
* Numerical value of the severity, normalized to values described in Log Data Model.
* [Optional].
*
*
* .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
* @return The enum numeric value on the wire for severityNumber.
*/
@java.lang.Override public int getSeverityNumberValue() {
return severityNumber_;
}
/**
*
* Numerical value of the severity, normalized to values described in Log Data Model.
* [Optional].
*
*
* .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
* @param value The enum numeric value on the wire for severityNumber to set.
* @return This builder for chaining.
*/
public Builder setSeverityNumberValue(int value) {
severityNumber_ = value;
onChanged();
return this;
}
/**
*
* Numerical value of the severity, normalized to values described in Log Data Model.
* [Optional].
*
*
* .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
* @return The severityNumber.
*/
@java.lang.Override
public io.opentelemetry.proto.logs.v1.SeverityNumber getSeverityNumber() {
@SuppressWarnings("deprecation")
io.opentelemetry.proto.logs.v1.SeverityNumber result = io.opentelemetry.proto.logs.v1.SeverityNumber.valueOf(severityNumber_);
return result == null ? io.opentelemetry.proto.logs.v1.SeverityNumber.UNRECOGNIZED : result;
}
/**
*
* Numerical value of the severity, normalized to values described in Log Data Model.
* [Optional].
*
*
* .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
* @param value The severityNumber to set.
* @return This builder for chaining.
*/
public Builder setSeverityNumber(io.opentelemetry.proto.logs.v1.SeverityNumber value) {
if (value == null) {
throw new NullPointerException();
}
severityNumber_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Numerical value of the severity, normalized to values described in Log Data Model.
* [Optional].
*
* The severity text (also known as log level). The original string representation as
* it is known at the source. [Optional].
*
*
* string severity_text = 3;
* @return The bytes for severityText.
*/
public com.google.protobuf.ByteString
getSeverityTextBytes() {
java.lang.Object ref = severityText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
severityText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The severity text (also known as log level). The original string representation as
* it is known at the source. [Optional].
*
*
* string severity_text = 3;
* @param value The severityText to set.
* @return This builder for chaining.
*/
public Builder setSeverityText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
severityText_ = value;
onChanged();
return this;
}
/**
*
* The severity text (also known as log level). The original string representation as
* it is known at the source. [Optional].
*
*
* string severity_text = 3;
* @return This builder for chaining.
*/
public Builder clearSeverityText() {
severityText_ = getDefaultInstance().getSeverityText();
onChanged();
return this;
}
/**
*
* The severity text (also known as log level). The original string representation as
* it is known at the source. [Optional].
*
*
* string severity_text = 3;
* @param value The bytes for severityText to set.
* @return This builder for chaining.
*/
public Builder setSeverityTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
severityText_ = value;
onChanged();
return this;
}
private io.opentelemetry.proto.common.v1.AnyValue body_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opentelemetry.proto.common.v1.AnyValue, io.opentelemetry.proto.common.v1.AnyValue.Builder, io.opentelemetry.proto.common.v1.AnyValueOrBuilder> bodyBuilder_;
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
*
* .opentelemetry.proto.common.v1.AnyValue body = 5;
* @return Whether the body field is set.
*/
public boolean hasBody() {
return bodyBuilder_ != null || body_ != null;
}
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
*
* .opentelemetry.proto.common.v1.AnyValue body = 5;
* @return The body.
*/
public io.opentelemetry.proto.common.v1.AnyValue getBody() {
if (bodyBuilder_ == null) {
return body_ == null ? io.opentelemetry.proto.common.v1.AnyValue.getDefaultInstance() : body_;
} else {
return bodyBuilder_.getMessage();
}
}
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
*
* .opentelemetry.proto.common.v1.AnyValue body = 5;
*/
public Builder setBody(io.opentelemetry.proto.common.v1.AnyValue value) {
if (bodyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
body_ = value;
onChanged();
} else {
bodyBuilder_.setMessage(value);
}
return this;
}
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
*
* .opentelemetry.proto.common.v1.AnyValue body = 5;
*/
public io.opentelemetry.proto.common.v1.AnyValue.Builder getBodyBuilder() {
onChanged();
return getBodyFieldBuilder().getBuilder();
}
/**
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
* A value containing the body of the log record. Can be for example a human-readable
* string message (including multi-line) describing the event in a free form or it can
* be a structured data composed of arrays and maps of other values. [Optional].
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
public int getAttributesCount() {
if (attributesBuilder_ == null) {
return attributes_.size();
} else {
return attributesBuilder_.getCount();
}
}
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
public Builder setAttributes(
int index, io.opentelemetry.proto.common.v1.KeyValue value) {
if (attributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttributesIsMutable();
attributes_.set(index, value);
onChanged();
} else {
attributesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
public Builder addAttributes(io.opentelemetry.proto.common.v1.KeyValue value) {
if (attributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttributesIsMutable();
attributes_.add(value);
onChanged();
} else {
attributesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
public Builder addAttributes(
int index, io.opentelemetry.proto.common.v1.KeyValue value) {
if (attributesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttributesIsMutable();
attributes_.add(index, value);
onChanged();
} else {
attributesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
public io.opentelemetry.proto.common.v1.KeyValue.Builder getAttributesBuilder(
int index) {
return getAttributesFieldBuilder().getBuilder(index);
}
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
public io.opentelemetry.proto.common.v1.KeyValueOrBuilder getAttributesOrBuilder(
int index) {
if (attributesBuilder_ == null) {
return attributes_.get(index); } else {
return attributesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
* Additional attributes that describe the specific event occurrence. [Optional].
* Attribute keys MUST be unique (it is not allowed to have more than one
* attribute with the same key).
*
*
* repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
*/
public java.util.List
getAttributesBuilderList() {
return getAttributesFieldBuilder().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>
getAttributesFieldBuilder() {
if (attributesBuilder_ == null) {
attributesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opentelemetry.proto.common.v1.KeyValue, io.opentelemetry.proto.common.v1.KeyValue.Builder, io.opentelemetry.proto.common.v1.KeyValueOrBuilder>(
attributes_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
attributes_ = null;
}
return attributesBuilder_;
}
private int droppedAttributesCount_ ;
/**
* uint32 dropped_attributes_count = 7;
* @return The droppedAttributesCount.
*/
@java.lang.Override
public int getDroppedAttributesCount() {
return droppedAttributesCount_;
}
/**
* uint32 dropped_attributes_count = 7;
* @param value The droppedAttributesCount to set.
* @return This builder for chaining.
*/
public Builder setDroppedAttributesCount(int value) {
droppedAttributesCount_ = value;
onChanged();
return this;
}
/**
* uint32 dropped_attributes_count = 7;
* @return This builder for chaining.
*/
public Builder clearDroppedAttributesCount() {
droppedAttributesCount_ = 0;
onChanged();
return this;
}
private int flags_ ;
/**
*
* Flags, a bit field. 8 least significant bits are the trace flags as
* defined in W3C Trace Context specification. 24 most significant bits are reserved
* and must be set to 0. Readers must not assume that 24 most significant bits
* will be zero and must correctly mask the bits when reading 8-bit trace flag (use
* flags & TRACE_FLAGS_MASK). [Optional].
*
*
* fixed32 flags = 8;
* @return The flags.
*/
@java.lang.Override
public int getFlags() {
return flags_;
}
/**
*
* Flags, a bit field. 8 least significant bits are the trace flags as
* defined in W3C Trace Context specification. 24 most significant bits are reserved
* and must be set to 0. Readers must not assume that 24 most significant bits
* will be zero and must correctly mask the bits when reading 8-bit trace flag (use
* flags & TRACE_FLAGS_MASK). [Optional].
*
*
* fixed32 flags = 8;
* @param value The flags to set.
* @return This builder for chaining.
*/
public Builder setFlags(int value) {
flags_ = value;
onChanged();
return this;
}
/**
*
* Flags, a bit field. 8 least significant bits are the trace flags as
* defined in W3C Trace Context specification. 24 most significant bits are reserved
* and must be set to 0. Readers must not assume that 24 most significant bits
* will be zero and must correctly mask the bits when reading 8-bit trace flag (use
* flags & TRACE_FLAGS_MASK). [Optional].
*
* A unique identifier for a trace. All logs from the same trace share
* the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
* is considered invalid. Can be set for logs that are part of request processing
* and have an assigned trace id. [Optional].
*
* A unique identifier for a trace. All logs from the same trace share
* the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
* is considered invalid. Can be set for logs that are part of request processing
* and have an assigned trace id. [Optional].
*
*
* bytes trace_id = 9;
* @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;
onChanged();
return this;
}
/**
*
* A unique identifier for a trace. All logs from the same trace share
* the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
* is considered invalid. Can be set for logs that are part of request processing
* and have an assigned trace id. [Optional].
*
* A unique identifier for a span within a trace, assigned when the span
* is created. The ID is an 8-byte array. An ID with all zeroes is considered
* invalid. Can be set for logs that are part of a particular processing span.
* If span_id is present trace_id SHOULD be also present. [Optional].
*
* A unique identifier for a span within a trace, assigned when the span
* is created. The ID is an 8-byte array. An ID with all zeroes is considered
* invalid. Can be set for logs that are part of a particular processing span.
* If span_id is present trace_id SHOULD be also present. [Optional].
*
*
* bytes span_id = 10;
* @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;
onChanged();
return this;
}
/**
*
* A unique identifier for a span within a trace, assigned when the span
* is created. The ID is an 8-byte array. An ID with all zeroes is considered
* invalid. Can be set for logs that are part of a particular processing span.
* If span_id is present trace_id SHOULD be also present. [Optional].
*
*
* bytes span_id = 10;
* @return This builder for chaining.
*/
public Builder clearSpanId() {
spanId_ = getDefaultInstance().getSpanId();
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.logs.v1.LogRecord)
}
// @@protoc_insertion_point(class_scope:opentelemetry.proto.logs.v1.LogRecord)
private static final io.opentelemetry.proto.logs.v1.LogRecord DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opentelemetry.proto.logs.v1.LogRecord();
}
public static io.opentelemetry.proto.logs.v1.LogRecord getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LogRecord parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LogRecord(input, extensionRegistry);
}
};
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.logs.v1.LogRecord getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}