All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.proto.logs.v1.LogRecord Maven / Gradle / Ivy

// 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].
   * 
* * string severity_text = 3; * @return The severityText. */ @java.lang.Override public java.lang.String getSeverityText() { java.lang.Object ref = severityText_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); severityText_ = s; return s; } } /** *
   * 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).
   * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ @java.lang.Override public java.util.List getAttributesList() { return 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).
   * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ @java.lang.Override public java.util.List getAttributesOrBuilderList() { return 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).
   * 
* * 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).
   * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ @java.lang.Override public io.opentelemetry.proto.common.v1.KeyValue getAttributes(int index) { return attributes_.get(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; */ @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 & LOG_RECORD_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 OR
   * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
   * is zero-length and thus is also invalid).
   * This field is optional.
   * The receivers SHOULD assume that the log record is not associated with a
   * trace if any of the following is true:
   *   - the field is not present,
   *   - the field contains an invalid value.
   * 
* * 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 OR of length
   * other than 8 bytes is considered invalid (empty string in OTLP/JSON
   * is zero-length and thus is also invalid).
   * This field is optional. If the sender specifies a valid span_id then it SHOULD also
   * specify a valid trace_id.
   * The receivers SHOULD assume that the log record is not associated with a
   * span if any of the following is true:
   *   - the field is not present,
   *   - the field contains an invalid value.
   * 
* * bytes span_id = 10; * @return The spanId. */ @java.lang.Override public com.google.protobuf.ByteString getSpanId() { return spanId_; } 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(1, timeUnixNano_); } if (severityNumber_ != io.opentelemetry.proto.logs.v1.SeverityNumber.SEVERITY_NUMBER_UNSPECIFIED.getNumber()) { output.writeEnum(2, severityNumber_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityText_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, severityText_); } if (body_ != null) { output.writeMessage(5, getBody()); } for (int i = 0; i < attributes_.size(); i++) { output.writeMessage(6, attributes_.get(i)); } if (droppedAttributesCount_ != 0) { output.writeUInt32(7, droppedAttributesCount_); } if (flags_ != 0) { output.writeFixed32(8, flags_); } if (!traceId_.isEmpty()) { output.writeBytes(9, traceId_); } if (!spanId_.isEmpty()) { output.writeBytes(10, spanId_); } if (observedTimeUnixNano_ != 0L) { output.writeFixed64(11, observedTimeUnixNano_); } unknownFields.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(1, timeUnixNano_); } if (severityNumber_ != io.opentelemetry.proto.logs.v1.SeverityNumber.SEVERITY_NUMBER_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, severityNumber_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(severityText_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, severityText_); } if (body_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getBody()); } for (int i = 0; i < attributes_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, attributes_.get(i)); } if (droppedAttributesCount_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(7, droppedAttributesCount_); } if (flags_ != 0) { size += com.google.protobuf.CodedOutputStream .computeFixed32Size(8, flags_); } if (!traceId_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(9, traceId_); } if (!spanId_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(10, spanId_); } if (observedTimeUnixNano_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeFixed64Size(11, observedTimeUnixNano_); } 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 io.opentelemetry.proto.logs.v1.LogRecord)) { return super.equals(obj); } io.opentelemetry.proto.logs.v1.LogRecord other = (io.opentelemetry.proto.logs.v1.LogRecord) obj; if (getTimeUnixNano() != other.getTimeUnixNano()) return false; if (getObservedTimeUnixNano() != other.getObservedTimeUnixNano()) return false; if (severityNumber_ != other.severityNumber_) return false; if (!getSeverityText() .equals(other.getSeverityText())) return false; if (hasBody() != other.hasBody()) return false; if (hasBody()) { if (!getBody() .equals(other.getBody())) return false; } if (!getAttributesList() .equals(other.getAttributesList())) return false; if (getDroppedAttributesCount() != other.getDroppedAttributesCount()) return false; if (getFlags() != other.getFlags()) return false; if (!getTraceId() .equals(other.getTraceId())) return false; if (!getSpanId() .equals(other.getSpanId())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TIME_UNIX_NANO_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTimeUnixNano()); hash = (37 * hash) + OBSERVED_TIME_UNIX_NANO_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getObservedTimeUnixNano()); hash = (37 * hash) + SEVERITY_NUMBER_FIELD_NUMBER; hash = (53 * hash) + severityNumber_; hash = (37 * hash) + SEVERITY_TEXT_FIELD_NUMBER; hash = (53 * hash) + getSeverityText().hashCode(); if (hasBody()) { hash = (37 * hash) + BODY_FIELD_NUMBER; hash = (53 * hash) + getBody().hashCode(); } if (getAttributesCount() > 0) { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + getAttributesList().hashCode(); } hash = (37 * hash) + DROPPED_ATTRIBUTES_COUNT_FIELD_NUMBER; hash = (53 * hash) + getDroppedAttributesCount(); hash = (37 * hash) + FLAGS_FIELD_NUMBER; hash = (53 * hash) + getFlags(); hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; hash = (53 * hash) + getTraceId().hashCode(); hash = (37 * hash) + SPAN_ID_FIELD_NUMBER; hash = (53 * hash) + getSpanId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opentelemetry.proto.logs.v1.LogRecord parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.logs.v1.LogRecord 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.logs.v1.LogRecord parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.logs.v1.LogRecord 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.logs.v1.LogRecord parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.logs.v1.LogRecord parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.logs.v1.LogRecord parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.logs.v1.LogRecord 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.logs.v1.LogRecord parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opentelemetry.proto.logs.v1.LogRecord 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.logs.v1.LogRecord parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.logs.v1.LogRecord 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.logs.v1.LogRecord 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 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 static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opentelemetry.proto.logs.v1.LogRecord) io.opentelemetry.proto.logs.v1.LogRecordOrBuilder { 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); } // Construct using io.opentelemetry.proto.logs.v1.LogRecord.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getAttributesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); timeUnixNano_ = 0L; observedTimeUnixNano_ = 0L; severityNumber_ = 0; severityText_ = ""; if (bodyBuilder_ == null) { body_ = null; } else { body_ = null; bodyBuilder_ = null; } if (attributesBuilder_ == null) { attributes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { attributesBuilder_.clear(); } droppedAttributesCount_ = 0; flags_ = 0; traceId_ = com.google.protobuf.ByteString.EMPTY; spanId_ = com.google.protobuf.ByteString.EMPTY; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opentelemetry.proto.logs.v1.LogsProto.internal_static_opentelemetry_proto_logs_v1_LogRecord_descriptor; } @java.lang.Override public io.opentelemetry.proto.logs.v1.LogRecord getDefaultInstanceForType() { return io.opentelemetry.proto.logs.v1.LogRecord.getDefaultInstance(); } @java.lang.Override public io.opentelemetry.proto.logs.v1.LogRecord build() { io.opentelemetry.proto.logs.v1.LogRecord result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opentelemetry.proto.logs.v1.LogRecord buildPartial() { io.opentelemetry.proto.logs.v1.LogRecord result = new io.opentelemetry.proto.logs.v1.LogRecord(this); int from_bitField0_ = bitField0_; result.timeUnixNano_ = timeUnixNano_; result.observedTimeUnixNano_ = observedTimeUnixNano_; result.severityNumber_ = severityNumber_; result.severityText_ = severityText_; if (bodyBuilder_ == null) { result.body_ = body_; } else { result.body_ = bodyBuilder_.build(); } if (attributesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { attributes_ = java.util.Collections.unmodifiableList(attributes_); bitField0_ = (bitField0_ & ~0x00000001); } result.attributes_ = attributes_; } else { result.attributes_ = attributesBuilder_.build(); } result.droppedAttributesCount_ = droppedAttributesCount_; result.flags_ = flags_; result.traceId_ = traceId_; result.spanId_ = spanId_; onBuilt(); return result; } @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.logs.v1.LogRecord) { return mergeFrom((io.opentelemetry.proto.logs.v1.LogRecord)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opentelemetry.proto.logs.v1.LogRecord other) { if (other == io.opentelemetry.proto.logs.v1.LogRecord.getDefaultInstance()) return this; if (other.getTimeUnixNano() != 0L) { setTimeUnixNano(other.getTimeUnixNano()); } if (other.getObservedTimeUnixNano() != 0L) { setObservedTimeUnixNano(other.getObservedTimeUnixNano()); } if (other.severityNumber_ != 0) { setSeverityNumberValue(other.getSeverityNumberValue()); } if (!other.getSeverityText().isEmpty()) { severityText_ = other.severityText_; onChanged(); } if (other.hasBody()) { mergeBody(other.getBody()); } if (attributesBuilder_ == null) { if (!other.attributes_.isEmpty()) { if (attributes_.isEmpty()) { attributes_ = other.attributes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAttributesIsMutable(); attributes_.addAll(other.attributes_); } onChanged(); } } else { if (!other.attributes_.isEmpty()) { if (attributesBuilder_.isEmpty()) { attributesBuilder_.dispose(); attributesBuilder_ = null; attributes_ = other.attributes_; bitField0_ = (bitField0_ & ~0x00000001); attributesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAttributesFieldBuilder() : null; } else { attributesBuilder_.addAllMessages(other.attributes_); } } } if (other.getDroppedAttributesCount() != 0) { setDroppedAttributesCount(other.getDroppedAttributesCount()); } if (other.getFlags() != 0) { setFlags(other.getFlags()); } if (other.getTraceId() != com.google.protobuf.ByteString.EMPTY) { setTraceId(other.getTraceId()); } if (other.getSpanId() != com.google.protobuf.ByteString.EMPTY) { setSpanId(other.getSpanId()); } this.mergeUnknownFields(other.unknownFields); 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 { io.opentelemetry.proto.logs.v1.LogRecord parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opentelemetry.proto.logs.v1.LogRecord) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; 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_; } /** *
     * 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].
     * 
* * .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2; * @return This builder for chaining. */ public Builder clearSeverityNumber() { severityNumber_ = 0; onChanged(); return this; } private java.lang.Object severityText_ = ""; /** *
     * 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 severityText. */ public java.lang.String getSeverityText() { java.lang.Object ref = severityText_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); severityText_ = s; return s; } else { return (java.lang.String) 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; * @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].
     * 
* * .opentelemetry.proto.common.v1.AnyValue body = 5; */ public Builder setBody( io.opentelemetry.proto.common.v1.AnyValue.Builder builderForValue) { if (bodyBuilder_ == null) { body_ = builderForValue.build(); onChanged(); } else { bodyBuilder_.setMessage(builderForValue.build()); } 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].
     * 
* * .opentelemetry.proto.common.v1.AnyValue body = 5; */ public Builder mergeBody(io.opentelemetry.proto.common.v1.AnyValue value) { if (bodyBuilder_ == null) { if (body_ != null) { body_ = io.opentelemetry.proto.common.v1.AnyValue.newBuilder(body_).mergeFrom(value).buildPartial(); } else { body_ = value; } onChanged(); } else { bodyBuilder_.mergeFrom(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].
     * 
* * .opentelemetry.proto.common.v1.AnyValue body = 5; */ public Builder clearBody() { if (bodyBuilder_ == null) { body_ = null; onChanged(); } else { body_ = null; bodyBuilder_ = null; } 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].
     * 
* * .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].
     * 
* * .opentelemetry.proto.common.v1.AnyValue body = 5; */ public io.opentelemetry.proto.common.v1.AnyValueOrBuilder getBodyOrBuilder() { if (bodyBuilder_ != null) { return bodyBuilder_.getMessageOrBuilder(); } else { 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; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.AnyValue, io.opentelemetry.proto.common.v1.AnyValue.Builder, io.opentelemetry.proto.common.v1.AnyValueOrBuilder> getBodyFieldBuilder() { if (bodyBuilder_ == null) { bodyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.common.v1.AnyValue, io.opentelemetry.proto.common.v1.AnyValue.Builder, io.opentelemetry.proto.common.v1.AnyValueOrBuilder>( getBody(), getParentForChildren(), isClean()); body_ = null; } return bodyBuilder_; } private java.util.List attributes_ = java.util.Collections.emptyList(); private void ensureAttributesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { attributes_ = new java.util.ArrayList(attributes_); 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> attributesBuilder_; /** *
     * 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 getAttributesList() { if (attributesBuilder_ == null) { return java.util.Collections.unmodifiableList(attributes_); } else { return attributesBuilder_.getMessageList(); } } /** *
     * 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).
     * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ public io.opentelemetry.proto.common.v1.KeyValue getAttributes(int index) { if (attributesBuilder_ == null) { return attributes_.get(index); } else { return attributesBuilder_.getMessage(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 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).
     * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ public Builder setAttributes( int index, io.opentelemetry.proto.common.v1.KeyValue.Builder builderForValue) { if (attributesBuilder_ == null) { ensureAttributesIsMutable(); attributes_.set(index, builderForValue.build()); onChanged(); } else { attributesBuilder_.setMessage(index, builderForValue.build()); } 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(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).
     * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ public Builder addAttributes( io.opentelemetry.proto.common.v1.KeyValue.Builder builderForValue) { if (attributesBuilder_ == null) { ensureAttributesIsMutable(); attributes_.add(builderForValue.build()); onChanged(); } else { attributesBuilder_.addMessage(builderForValue.build()); } 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.Builder builderForValue) { if (attributesBuilder_ == null) { ensureAttributesIsMutable(); attributes_.add(index, builderForValue.build()); onChanged(); } else { attributesBuilder_.addMessage(index, builderForValue.build()); } 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 addAllAttributes( java.lang.Iterable values) { if (attributesBuilder_ == null) { ensureAttributesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, attributes_); onChanged(); } else { attributesBuilder_.addAllMessages(values); } 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 clearAttributes() { if (attributesBuilder_ == null) { attributes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { attributesBuilder_.clear(); } 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 removeAttributes(int index) { if (attributesBuilder_ == null) { ensureAttributesIsMutable(); attributes_.remove(index); onChanged(); } else { attributesBuilder_.remove(index); } 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 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).
     * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ public java.util.List getAttributesOrBuilderList() { if (attributesBuilder_ != null) { return attributesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(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).
     * 
* * repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6; */ public io.opentelemetry.proto.common.v1.KeyValue.Builder addAttributesBuilder() { return getAttributesFieldBuilder().addBuilder( io.opentelemetry.proto.common.v1.KeyValue.getDefaultInstance()); } /** *
     * 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 addAttributesBuilder( int index) { return getAttributesFieldBuilder().addBuilder( index, io.opentelemetry.proto.common.v1.KeyValue.getDefaultInstance()); } /** *
     * 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 & LOG_RECORD_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 & LOG_RECORD_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 & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
     * 
* * fixed32 flags = 8; * @return This builder for chaining. */ public Builder clearFlags() { flags_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString traceId_ = com.google.protobuf.ByteString.EMPTY; /** *
     * 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 OR
     * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is optional.
     * The receivers SHOULD assume that the log record is not associated with a
     * trace if any of the following is true:
     *   - the field is not present,
     *   - the field contains an invalid value.
     * 
* * bytes trace_id = 9; * @return The traceId. */ @java.lang.Override public com.google.protobuf.ByteString getTraceId() { return 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 OR
     * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is optional.
     * The receivers SHOULD assume that the log record is not associated with a
     * trace if any of the following is true:
     *   - the field is not present,
     *   - the field contains an invalid value.
     * 
* * 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 OR
     * of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is optional.
     * The receivers SHOULD assume that the log record is not associated with a
     * trace if any of the following is true:
     *   - the field is not present,
     *   - the field contains an invalid value.
     * 
* * bytes trace_id = 9; * @return This builder for chaining. */ public Builder clearTraceId() { traceId_ = getDefaultInstance().getTraceId(); onChanged(); return this; } private com.google.protobuf.ByteString spanId_ = com.google.protobuf.ByteString.EMPTY; /** *
     * 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 OR of length
     * other than 8 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is optional. If the sender specifies a valid span_id then it SHOULD also
     * specify a valid trace_id.
     * The receivers SHOULD assume that the log record is not associated with a
     * span if any of the following is true:
     *   - the field is not present,
     *   - the field contains an invalid value.
     * 
* * bytes span_id = 10; * @return The spanId. */ @java.lang.Override public com.google.protobuf.ByteString getSpanId() { return 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 OR of length
     * other than 8 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is optional. If the sender specifies a valid span_id then it SHOULD also
     * specify a valid trace_id.
     * The receivers SHOULD assume that the log record is not associated with a
     * span if any of the following is true:
     *   - the field is not present,
     *   - the field contains an invalid value.
     * 
* * 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 OR of length
     * other than 8 bytes is considered invalid (empty string in OTLP/JSON
     * is zero-length and thus is also invalid).
     * This field is optional. If the sender specifies a valid span_id then it SHOULD also
     * specify a valid trace_id.
     * The receivers SHOULD assume that the log record is not associated with a
     * span if any of the following is true:
     *   - the field is not present,
     *   - the field contains an invalid value.
     * 
* * 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; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy