Please wait. This can take some minutes ...
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.
io.opentelemetry.proto.trace.v1.ScopeSpans Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: opentelemetry/proto/trace/v1/trace.proto
package io.opentelemetry.proto.trace.v1;
/**
*
* A collection of Spans produced by an InstrumentationScope.
*
*
* Protobuf type {@code opentelemetry.proto.trace.v1.ScopeSpans}
*/
public final class ScopeSpans extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opentelemetry.proto.trace.v1.ScopeSpans)
ScopeSpansOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScopeSpans.newBuilder() to construct.
private ScopeSpans(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScopeSpans() {
spans_ = java.util.Collections.emptyList();
schemaUrl_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ScopeSpans();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ScopeSpans(
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 10: {
io.opentelemetry.proto.common.v1.InstrumentationScope.Builder subBuilder = null;
if (scope_ != null) {
subBuilder = scope_.toBuilder();
}
scope_ = input.readMessage(io.opentelemetry.proto.common.v1.InstrumentationScope.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(scope_);
scope_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
spans_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
spans_.add(
input.readMessage(io.opentelemetry.proto.trace.v1.Span.parser(), extensionRegistry));
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
schemaUrl_ = s;
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)) {
spans_ = java.util.Collections.unmodifiableList(spans_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ScopeSpans_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ScopeSpans_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opentelemetry.proto.trace.v1.ScopeSpans.class, io.opentelemetry.proto.trace.v1.ScopeSpans.Builder.class);
}
public static final int SCOPE_FIELD_NUMBER = 1;
private io.opentelemetry.proto.common.v1.InstrumentationScope scope_;
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
* @return Whether the scope field is set.
*/
@java.lang.Override
public boolean hasScope() {
return scope_ != null;
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
* @return The scope.
*/
@java.lang.Override
public io.opentelemetry.proto.common.v1.InstrumentationScope getScope() {
return scope_ == null ? io.opentelemetry.proto.common.v1.InstrumentationScope.getDefaultInstance() : scope_;
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
@java.lang.Override
public io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder getScopeOrBuilder() {
return getScope();
}
public static final int SPANS_FIELD_NUMBER = 2;
private java.util.List spans_;
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
@java.lang.Override
public java.util.List getSpansList() {
return spans_;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
@java.lang.Override
public java.util.List extends io.opentelemetry.proto.trace.v1.SpanOrBuilder>
getSpansOrBuilderList() {
return spans_;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
@java.lang.Override
public int getSpansCount() {
return spans_.size();
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
@java.lang.Override
public io.opentelemetry.proto.trace.v1.Span getSpans(int index) {
return spans_.get(index);
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
@java.lang.Override
public io.opentelemetry.proto.trace.v1.SpanOrBuilder getSpansOrBuilder(
int index) {
return spans_.get(index);
}
public static final int SCHEMA_URL_FIELD_NUMBER = 3;
private volatile java.lang.Object schemaUrl_;
/**
*
* This schema_url applies to all spans and span events in the "spans" field.
*
*
* string schema_url = 3;
* @return The schemaUrl.
*/
@java.lang.Override
public java.lang.String getSchemaUrl() {
java.lang.Object ref = schemaUrl_;
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();
schemaUrl_ = s;
return s;
}
}
/**
*
* This schema_url applies to all spans and span events in the "spans" field.
*
*
* string schema_url = 3;
* @return The bytes for schemaUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSchemaUrlBytes() {
java.lang.Object ref = schemaUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
schemaUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (scope_ != null) {
output.writeMessage(1, getScope());
}
for (int i = 0; i < spans_.size(); i++) {
output.writeMessage(2, spans_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, schemaUrl_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (scope_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getScope());
}
for (int i = 0; i < spans_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, spans_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, schemaUrl_);
}
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.trace.v1.ScopeSpans)) {
return super.equals(obj);
}
io.opentelemetry.proto.trace.v1.ScopeSpans other = (io.opentelemetry.proto.trace.v1.ScopeSpans) obj;
if (hasScope() != other.hasScope()) return false;
if (hasScope()) {
if (!getScope()
.equals(other.getScope())) return false;
}
if (!getSpansList()
.equals(other.getSpansList())) return false;
if (!getSchemaUrl()
.equals(other.getSchemaUrl())) 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();
if (hasScope()) {
hash = (37 * hash) + SCOPE_FIELD_NUMBER;
hash = (53 * hash) + getScope().hashCode();
}
if (getSpansCount() > 0) {
hash = (37 * hash) + SPANS_FIELD_NUMBER;
hash = (53 * hash) + getSpansList().hashCode();
}
hash = (37 * hash) + SCHEMA_URL_FIELD_NUMBER;
hash = (53 * hash) + getSchemaUrl().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans 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.trace.v1.ScopeSpans parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans 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.trace.v1.ScopeSpans parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans 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.trace.v1.ScopeSpans parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans 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.trace.v1.ScopeSpans parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans 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.trace.v1.ScopeSpans 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 collection of Spans produced by an InstrumentationScope.
*
*
* Protobuf type {@code opentelemetry.proto.trace.v1.ScopeSpans}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:opentelemetry.proto.trace.v1.ScopeSpans)
io.opentelemetry.proto.trace.v1.ScopeSpansOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ScopeSpans_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ScopeSpans_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opentelemetry.proto.trace.v1.ScopeSpans.class, io.opentelemetry.proto.trace.v1.ScopeSpans.Builder.class);
}
// Construct using io.opentelemetry.proto.trace.v1.ScopeSpans.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSpansFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (scopeBuilder_ == null) {
scope_ = null;
} else {
scope_ = null;
scopeBuilder_ = null;
}
if (spansBuilder_ == null) {
spans_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
spansBuilder_.clear();
}
schemaUrl_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ScopeSpans_descriptor;
}
@java.lang.Override
public io.opentelemetry.proto.trace.v1.ScopeSpans getDefaultInstanceForType() {
return io.opentelemetry.proto.trace.v1.ScopeSpans.getDefaultInstance();
}
@java.lang.Override
public io.opentelemetry.proto.trace.v1.ScopeSpans build() {
io.opentelemetry.proto.trace.v1.ScopeSpans result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.opentelemetry.proto.trace.v1.ScopeSpans buildPartial() {
io.opentelemetry.proto.trace.v1.ScopeSpans result = new io.opentelemetry.proto.trace.v1.ScopeSpans(this);
int from_bitField0_ = bitField0_;
if (scopeBuilder_ == null) {
result.scope_ = scope_;
} else {
result.scope_ = scopeBuilder_.build();
}
if (spansBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
spans_ = java.util.Collections.unmodifiableList(spans_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.spans_ = spans_;
} else {
result.spans_ = spansBuilder_.build();
}
result.schemaUrl_ = schemaUrl_;
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.trace.v1.ScopeSpans) {
return mergeFrom((io.opentelemetry.proto.trace.v1.ScopeSpans)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.opentelemetry.proto.trace.v1.ScopeSpans other) {
if (other == io.opentelemetry.proto.trace.v1.ScopeSpans.getDefaultInstance()) return this;
if (other.hasScope()) {
mergeScope(other.getScope());
}
if (spansBuilder_ == null) {
if (!other.spans_.isEmpty()) {
if (spans_.isEmpty()) {
spans_ = other.spans_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSpansIsMutable();
spans_.addAll(other.spans_);
}
onChanged();
}
} else {
if (!other.spans_.isEmpty()) {
if (spansBuilder_.isEmpty()) {
spansBuilder_.dispose();
spansBuilder_ = null;
spans_ = other.spans_;
bitField0_ = (bitField0_ & ~0x00000001);
spansBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSpansFieldBuilder() : null;
} else {
spansBuilder_.addAllMessages(other.spans_);
}
}
}
if (!other.getSchemaUrl().isEmpty()) {
schemaUrl_ = other.schemaUrl_;
onChanged();
}
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.trace.v1.ScopeSpans parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.opentelemetry.proto.trace.v1.ScopeSpans) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.opentelemetry.proto.common.v1.InstrumentationScope scope_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opentelemetry.proto.common.v1.InstrumentationScope, io.opentelemetry.proto.common.v1.InstrumentationScope.Builder, io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder> scopeBuilder_;
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
* @return Whether the scope field is set.
*/
public boolean hasScope() {
return scopeBuilder_ != null || scope_ != null;
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
* @return The scope.
*/
public io.opentelemetry.proto.common.v1.InstrumentationScope getScope() {
if (scopeBuilder_ == null) {
return scope_ == null ? io.opentelemetry.proto.common.v1.InstrumentationScope.getDefaultInstance() : scope_;
} else {
return scopeBuilder_.getMessage();
}
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
public Builder setScope(io.opentelemetry.proto.common.v1.InstrumentationScope value) {
if (scopeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
scope_ = value;
onChanged();
} else {
scopeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
public Builder setScope(
io.opentelemetry.proto.common.v1.InstrumentationScope.Builder builderForValue) {
if (scopeBuilder_ == null) {
scope_ = builderForValue.build();
onChanged();
} else {
scopeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
public Builder mergeScope(io.opentelemetry.proto.common.v1.InstrumentationScope value) {
if (scopeBuilder_ == null) {
if (scope_ != null) {
scope_ =
io.opentelemetry.proto.common.v1.InstrumentationScope.newBuilder(scope_).mergeFrom(value).buildPartial();
} else {
scope_ = value;
}
onChanged();
} else {
scopeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
public Builder clearScope() {
if (scopeBuilder_ == null) {
scope_ = null;
onChanged();
} else {
scope_ = null;
scopeBuilder_ = null;
}
return this;
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
public io.opentelemetry.proto.common.v1.InstrumentationScope.Builder getScopeBuilder() {
onChanged();
return getScopeFieldBuilder().getBuilder();
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
public io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder getScopeOrBuilder() {
if (scopeBuilder_ != null) {
return scopeBuilder_.getMessageOrBuilder();
} else {
return scope_ == null ?
io.opentelemetry.proto.common.v1.InstrumentationScope.getDefaultInstance() : scope_;
}
}
/**
*
* The instrumentation scope information for the spans in this message.
* Semantically when InstrumentationScope isn't set, it is equivalent with
* an empty instrumentation scope name (unknown).
*
*
* .opentelemetry.proto.common.v1.InstrumentationScope scope = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opentelemetry.proto.common.v1.InstrumentationScope, io.opentelemetry.proto.common.v1.InstrumentationScope.Builder, io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder>
getScopeFieldBuilder() {
if (scopeBuilder_ == null) {
scopeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opentelemetry.proto.common.v1.InstrumentationScope, io.opentelemetry.proto.common.v1.InstrumentationScope.Builder, io.opentelemetry.proto.common.v1.InstrumentationScopeOrBuilder>(
getScope(),
getParentForChildren(),
isClean());
scope_ = null;
}
return scopeBuilder_;
}
private java.util.List spans_ =
java.util.Collections.emptyList();
private void ensureSpansIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
spans_ = new java.util.ArrayList(spans_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opentelemetry.proto.trace.v1.Span, io.opentelemetry.proto.trace.v1.Span.Builder, io.opentelemetry.proto.trace.v1.SpanOrBuilder> spansBuilder_;
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public java.util.List getSpansList() {
if (spansBuilder_ == null) {
return java.util.Collections.unmodifiableList(spans_);
} else {
return spansBuilder_.getMessageList();
}
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public int getSpansCount() {
if (spansBuilder_ == null) {
return spans_.size();
} else {
return spansBuilder_.getCount();
}
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public io.opentelemetry.proto.trace.v1.Span getSpans(int index) {
if (spansBuilder_ == null) {
return spans_.get(index);
} else {
return spansBuilder_.getMessage(index);
}
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder setSpans(
int index, io.opentelemetry.proto.trace.v1.Span value) {
if (spansBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpansIsMutable();
spans_.set(index, value);
onChanged();
} else {
spansBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder setSpans(
int index, io.opentelemetry.proto.trace.v1.Span.Builder builderForValue) {
if (spansBuilder_ == null) {
ensureSpansIsMutable();
spans_.set(index, builderForValue.build());
onChanged();
} else {
spansBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder addSpans(io.opentelemetry.proto.trace.v1.Span value) {
if (spansBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpansIsMutable();
spans_.add(value);
onChanged();
} else {
spansBuilder_.addMessage(value);
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder addSpans(
int index, io.opentelemetry.proto.trace.v1.Span value) {
if (spansBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSpansIsMutable();
spans_.add(index, value);
onChanged();
} else {
spansBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder addSpans(
io.opentelemetry.proto.trace.v1.Span.Builder builderForValue) {
if (spansBuilder_ == null) {
ensureSpansIsMutable();
spans_.add(builderForValue.build());
onChanged();
} else {
spansBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder addSpans(
int index, io.opentelemetry.proto.trace.v1.Span.Builder builderForValue) {
if (spansBuilder_ == null) {
ensureSpansIsMutable();
spans_.add(index, builderForValue.build());
onChanged();
} else {
spansBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder addAllSpans(
java.lang.Iterable extends io.opentelemetry.proto.trace.v1.Span> values) {
if (spansBuilder_ == null) {
ensureSpansIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, spans_);
onChanged();
} else {
spansBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder clearSpans() {
if (spansBuilder_ == null) {
spans_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
spansBuilder_.clear();
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public Builder removeSpans(int index) {
if (spansBuilder_ == null) {
ensureSpansIsMutable();
spans_.remove(index);
onChanged();
} else {
spansBuilder_.remove(index);
}
return this;
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public io.opentelemetry.proto.trace.v1.Span.Builder getSpansBuilder(
int index) {
return getSpansFieldBuilder().getBuilder(index);
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public io.opentelemetry.proto.trace.v1.SpanOrBuilder getSpansOrBuilder(
int index) {
if (spansBuilder_ == null) {
return spans_.get(index); } else {
return spansBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public java.util.List extends io.opentelemetry.proto.trace.v1.SpanOrBuilder>
getSpansOrBuilderList() {
if (spansBuilder_ != null) {
return spansBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(spans_);
}
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public io.opentelemetry.proto.trace.v1.Span.Builder addSpansBuilder() {
return getSpansFieldBuilder().addBuilder(
io.opentelemetry.proto.trace.v1.Span.getDefaultInstance());
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public io.opentelemetry.proto.trace.v1.Span.Builder addSpansBuilder(
int index) {
return getSpansFieldBuilder().addBuilder(
index, io.opentelemetry.proto.trace.v1.Span.getDefaultInstance());
}
/**
*
* A list of Spans that originate from an instrumentation scope.
*
*
* repeated .opentelemetry.proto.trace.v1.Span spans = 2;
*/
public java.util.List
getSpansBuilderList() {
return getSpansFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.opentelemetry.proto.trace.v1.Span, io.opentelemetry.proto.trace.v1.Span.Builder, io.opentelemetry.proto.trace.v1.SpanOrBuilder>
getSpansFieldBuilder() {
if (spansBuilder_ == null) {
spansBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.opentelemetry.proto.trace.v1.Span, io.opentelemetry.proto.trace.v1.Span.Builder, io.opentelemetry.proto.trace.v1.SpanOrBuilder>(
spans_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
spans_ = null;
}
return spansBuilder_;
}
private java.lang.Object schemaUrl_ = "";
/**
*
* This schema_url applies to all spans and span events in the "spans" field.
*
*
* string schema_url = 3;
* @return The schemaUrl.
*/
public java.lang.String getSchemaUrl() {
java.lang.Object ref = schemaUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
schemaUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This schema_url applies to all spans and span events in the "spans" field.
*
*
* string schema_url = 3;
* @return The bytes for schemaUrl.
*/
public com.google.protobuf.ByteString
getSchemaUrlBytes() {
java.lang.Object ref = schemaUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
schemaUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This schema_url applies to all spans and span events in the "spans" field.
*
*
* string schema_url = 3;
* @param value The schemaUrl to set.
* @return This builder for chaining.
*/
public Builder setSchemaUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
schemaUrl_ = value;
onChanged();
return this;
}
/**
*
* This schema_url applies to all spans and span events in the "spans" field.
*
*
* string schema_url = 3;
* @return This builder for chaining.
*/
public Builder clearSchemaUrl() {
schemaUrl_ = getDefaultInstance().getSchemaUrl();
onChanged();
return this;
}
/**
*
* This schema_url applies to all spans and span events in the "spans" field.
*
*
* string schema_url = 3;
* @param value The bytes for schemaUrl to set.
* @return This builder for chaining.
*/
public Builder setSchemaUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
schemaUrl_ = value;
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.trace.v1.ScopeSpans)
}
// @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.ScopeSpans)
private static final io.opentelemetry.proto.trace.v1.ScopeSpans DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opentelemetry.proto.trace.v1.ScopeSpans();
}
public static io.opentelemetry.proto.trace.v1.ScopeSpans getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ScopeSpans parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ScopeSpans(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.trace.v1.ScopeSpans getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}