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

io.opentelemetry.proto.trace.v1.ResourceSpans Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// 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 ScopeSpans from a Resource.
 * 
* * Protobuf type {@code opentelemetry.proto.trace.v1.ResourceSpans} */ public final class ResourceSpans extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opentelemetry.proto.trace.v1.ResourceSpans) ResourceSpansOrBuilder { private static final long serialVersionUID = 0L; // Use ResourceSpans.newBuilder() to construct. private ResourceSpans(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ResourceSpans() { scopeSpans_ = java.util.Collections.emptyList(); schemaUrl_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ResourceSpans(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ResourceSpans( 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.resource.v1.Resource.Builder subBuilder = null; if (resource_ != null) { subBuilder = resource_.toBuilder(); } resource_ = input.readMessage(io.opentelemetry.proto.resource.v1.Resource.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(resource_); resource_ = subBuilder.buildPartial(); } break; } case 18: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { scopeSpans_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } scopeSpans_.add( input.readMessage(io.opentelemetry.proto.trace.v1.ScopeSpans.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)) { scopeSpans_ = java.util.Collections.unmodifiableList(scopeSpans_); } 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_ResourceSpans_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ResourceSpans_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.trace.v1.ResourceSpans.class, io.opentelemetry.proto.trace.v1.ResourceSpans.Builder.class); } public static final int RESOURCE_FIELD_NUMBER = 1; private io.opentelemetry.proto.resource.v1.Resource resource_; /** *
   * The resource for the spans in this message.
   * If this field is not set then no resource info is known.
   * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return Whether the resource field is set. */ @java.lang.Override public boolean hasResource() { return resource_ != null; } /** *
   * The resource for the spans in this message.
   * If this field is not set then no resource info is known.
   * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return The resource. */ @java.lang.Override public io.opentelemetry.proto.resource.v1.Resource getResource() { return resource_ == null ? io.opentelemetry.proto.resource.v1.Resource.getDefaultInstance() : resource_; } /** *
   * The resource for the spans in this message.
   * If this field is not set then no resource info is known.
   * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ @java.lang.Override public io.opentelemetry.proto.resource.v1.ResourceOrBuilder getResourceOrBuilder() { return getResource(); } public static final int SCOPE_SPANS_FIELD_NUMBER = 2; private java.util.List scopeSpans_; /** *
   * A list of ScopeSpans that originate from a resource.
   * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ @java.lang.Override public java.util.List getScopeSpansList() { return scopeSpans_; } /** *
   * A list of ScopeSpans that originate from a resource.
   * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ @java.lang.Override public java.util.List getScopeSpansOrBuilderList() { return scopeSpans_; } /** *
   * A list of ScopeSpans that originate from a resource.
   * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ @java.lang.Override public int getScopeSpansCount() { return scopeSpans_.size(); } /** *
   * A list of ScopeSpans that originate from a resource.
   * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ @java.lang.Override public io.opentelemetry.proto.trace.v1.ScopeSpans getScopeSpans(int index) { return scopeSpans_.get(index); } /** *
   * A list of ScopeSpans that originate from a resource.
   * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ @java.lang.Override public io.opentelemetry.proto.trace.v1.ScopeSpansOrBuilder getScopeSpansOrBuilder( int index) { return scopeSpans_.get(index); } public static final int SCHEMA_URL_FIELD_NUMBER = 3; private volatile java.lang.Object schemaUrl_; /** *
   * This schema_url applies to the data in the "resource" field. It does not apply
   * to the data in the "scope_spans" field which have their own schema_url 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 the data in the "resource" field. It does not apply
   * to the data in the "scope_spans" field which have their own schema_url 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 (resource_ != null) { output.writeMessage(1, getResource()); } for (int i = 0; i < scopeSpans_.size(); i++) { output.writeMessage(2, scopeSpans_.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 (resource_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getResource()); } for (int i = 0; i < scopeSpans_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, scopeSpans_.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.ResourceSpans)) { return super.equals(obj); } io.opentelemetry.proto.trace.v1.ResourceSpans other = (io.opentelemetry.proto.trace.v1.ResourceSpans) obj; if (hasResource() != other.hasResource()) return false; if (hasResource()) { if (!getResource() .equals(other.getResource())) return false; } if (!getScopeSpansList() .equals(other.getScopeSpansList())) 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 (hasResource()) { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } if (getScopeSpansCount() > 0) { hash = (37 * hash) + SCOPE_SPANS_FIELD_NUMBER; hash = (53 * hash) + getScopeSpansList().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.ResourceSpans parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.trace.v1.ResourceSpans 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.ResourceSpans parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.trace.v1.ResourceSpans 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.ResourceSpans parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.trace.v1.ResourceSpans 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.ResourceSpans parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.trace.v1.ResourceSpans 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.ResourceSpans parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opentelemetry.proto.trace.v1.ResourceSpans 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.ResourceSpans 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.ResourceSpans 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.ResourceSpans 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 ScopeSpans from a Resource.
   * 
* * Protobuf type {@code opentelemetry.proto.trace.v1.ResourceSpans} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opentelemetry.proto.trace.v1.ResourceSpans) io.opentelemetry.proto.trace.v1.ResourceSpansOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ResourceSpans_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.trace.v1.TraceProto.internal_static_opentelemetry_proto_trace_v1_ResourceSpans_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.trace.v1.ResourceSpans.class, io.opentelemetry.proto.trace.v1.ResourceSpans.Builder.class); } // Construct using io.opentelemetry.proto.trace.v1.ResourceSpans.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getScopeSpansFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (resourceBuilder_ == null) { resource_ = null; } else { resource_ = null; resourceBuilder_ = null; } if (scopeSpansBuilder_ == null) { scopeSpans_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { scopeSpansBuilder_.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_ResourceSpans_descriptor; } @java.lang.Override public io.opentelemetry.proto.trace.v1.ResourceSpans getDefaultInstanceForType() { return io.opentelemetry.proto.trace.v1.ResourceSpans.getDefaultInstance(); } @java.lang.Override public io.opentelemetry.proto.trace.v1.ResourceSpans build() { io.opentelemetry.proto.trace.v1.ResourceSpans result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opentelemetry.proto.trace.v1.ResourceSpans buildPartial() { io.opentelemetry.proto.trace.v1.ResourceSpans result = new io.opentelemetry.proto.trace.v1.ResourceSpans(this); int from_bitField0_ = bitField0_; if (resourceBuilder_ == null) { result.resource_ = resource_; } else { result.resource_ = resourceBuilder_.build(); } if (scopeSpansBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { scopeSpans_ = java.util.Collections.unmodifiableList(scopeSpans_); bitField0_ = (bitField0_ & ~0x00000001); } result.scopeSpans_ = scopeSpans_; } else { result.scopeSpans_ = scopeSpansBuilder_.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.ResourceSpans) { return mergeFrom((io.opentelemetry.proto.trace.v1.ResourceSpans)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opentelemetry.proto.trace.v1.ResourceSpans other) { if (other == io.opentelemetry.proto.trace.v1.ResourceSpans.getDefaultInstance()) return this; if (other.hasResource()) { mergeResource(other.getResource()); } if (scopeSpansBuilder_ == null) { if (!other.scopeSpans_.isEmpty()) { if (scopeSpans_.isEmpty()) { scopeSpans_ = other.scopeSpans_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureScopeSpansIsMutable(); scopeSpans_.addAll(other.scopeSpans_); } onChanged(); } } else { if (!other.scopeSpans_.isEmpty()) { if (scopeSpansBuilder_.isEmpty()) { scopeSpansBuilder_.dispose(); scopeSpansBuilder_ = null; scopeSpans_ = other.scopeSpans_; bitField0_ = (bitField0_ & ~0x00000001); scopeSpansBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getScopeSpansFieldBuilder() : null; } else { scopeSpansBuilder_.addAllMessages(other.scopeSpans_); } } } 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.ResourceSpans parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opentelemetry.proto.trace.v1.ResourceSpans) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private io.opentelemetry.proto.resource.v1.Resource resource_; private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.resource.v1.Resource, io.opentelemetry.proto.resource.v1.Resource.Builder, io.opentelemetry.proto.resource.v1.ResourceOrBuilder> resourceBuilder_; /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return Whether the resource field is set. */ public boolean hasResource() { return resourceBuilder_ != null || resource_ != null; } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; * @return The resource. */ public io.opentelemetry.proto.resource.v1.Resource getResource() { if (resourceBuilder_ == null) { return resource_ == null ? io.opentelemetry.proto.resource.v1.Resource.getDefaultInstance() : resource_; } else { return resourceBuilder_.getMessage(); } } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder setResource(io.opentelemetry.proto.resource.v1.Resource value) { if (resourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resource_ = value; onChanged(); } else { resourceBuilder_.setMessage(value); } return this; } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder setResource( io.opentelemetry.proto.resource.v1.Resource.Builder builderForValue) { if (resourceBuilder_ == null) { resource_ = builderForValue.build(); onChanged(); } else { resourceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder mergeResource(io.opentelemetry.proto.resource.v1.Resource value) { if (resourceBuilder_ == null) { if (resource_ != null) { resource_ = io.opentelemetry.proto.resource.v1.Resource.newBuilder(resource_).mergeFrom(value).buildPartial(); } else { resource_ = value; } onChanged(); } else { resourceBuilder_.mergeFrom(value); } return this; } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public Builder clearResource() { if (resourceBuilder_ == null) { resource_ = null; onChanged(); } else { resource_ = null; resourceBuilder_ = null; } return this; } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public io.opentelemetry.proto.resource.v1.Resource.Builder getResourceBuilder() { onChanged(); return getResourceFieldBuilder().getBuilder(); } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ public io.opentelemetry.proto.resource.v1.ResourceOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { return resourceBuilder_.getMessageOrBuilder(); } else { return resource_ == null ? io.opentelemetry.proto.resource.v1.Resource.getDefaultInstance() : resource_; } } /** *
     * The resource for the spans in this message.
     * If this field is not set then no resource info is known.
     * 
* * .opentelemetry.proto.resource.v1.Resource resource = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.resource.v1.Resource, io.opentelemetry.proto.resource.v1.Resource.Builder, io.opentelemetry.proto.resource.v1.ResourceOrBuilder> getResourceFieldBuilder() { if (resourceBuilder_ == null) { resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.resource.v1.Resource, io.opentelemetry.proto.resource.v1.Resource.Builder, io.opentelemetry.proto.resource.v1.ResourceOrBuilder>( getResource(), getParentForChildren(), isClean()); resource_ = null; } return resourceBuilder_; } private java.util.List scopeSpans_ = java.util.Collections.emptyList(); private void ensureScopeSpansIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { scopeSpans_ = new java.util.ArrayList(scopeSpans_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.trace.v1.ScopeSpans, io.opentelemetry.proto.trace.v1.ScopeSpans.Builder, io.opentelemetry.proto.trace.v1.ScopeSpansOrBuilder> scopeSpansBuilder_; /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public java.util.List getScopeSpansList() { if (scopeSpansBuilder_ == null) { return java.util.Collections.unmodifiableList(scopeSpans_); } else { return scopeSpansBuilder_.getMessageList(); } } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public int getScopeSpansCount() { if (scopeSpansBuilder_ == null) { return scopeSpans_.size(); } else { return scopeSpansBuilder_.getCount(); } } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public io.opentelemetry.proto.trace.v1.ScopeSpans getScopeSpans(int index) { if (scopeSpansBuilder_ == null) { return scopeSpans_.get(index); } else { return scopeSpansBuilder_.getMessage(index); } } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder setScopeSpans( int index, io.opentelemetry.proto.trace.v1.ScopeSpans value) { if (scopeSpansBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeSpansIsMutable(); scopeSpans_.set(index, value); onChanged(); } else { scopeSpansBuilder_.setMessage(index, value); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder setScopeSpans( int index, io.opentelemetry.proto.trace.v1.ScopeSpans.Builder builderForValue) { if (scopeSpansBuilder_ == null) { ensureScopeSpansIsMutable(); scopeSpans_.set(index, builderForValue.build()); onChanged(); } else { scopeSpansBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder addScopeSpans(io.opentelemetry.proto.trace.v1.ScopeSpans value) { if (scopeSpansBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeSpansIsMutable(); scopeSpans_.add(value); onChanged(); } else { scopeSpansBuilder_.addMessage(value); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder addScopeSpans( int index, io.opentelemetry.proto.trace.v1.ScopeSpans value) { if (scopeSpansBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureScopeSpansIsMutable(); scopeSpans_.add(index, value); onChanged(); } else { scopeSpansBuilder_.addMessage(index, value); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder addScopeSpans( io.opentelemetry.proto.trace.v1.ScopeSpans.Builder builderForValue) { if (scopeSpansBuilder_ == null) { ensureScopeSpansIsMutable(); scopeSpans_.add(builderForValue.build()); onChanged(); } else { scopeSpansBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder addScopeSpans( int index, io.opentelemetry.proto.trace.v1.ScopeSpans.Builder builderForValue) { if (scopeSpansBuilder_ == null) { ensureScopeSpansIsMutable(); scopeSpans_.add(index, builderForValue.build()); onChanged(); } else { scopeSpansBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder addAllScopeSpans( java.lang.Iterable values) { if (scopeSpansBuilder_ == null) { ensureScopeSpansIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, scopeSpans_); onChanged(); } else { scopeSpansBuilder_.addAllMessages(values); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder clearScopeSpans() { if (scopeSpansBuilder_ == null) { scopeSpans_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { scopeSpansBuilder_.clear(); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public Builder removeScopeSpans(int index) { if (scopeSpansBuilder_ == null) { ensureScopeSpansIsMutable(); scopeSpans_.remove(index); onChanged(); } else { scopeSpansBuilder_.remove(index); } return this; } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public io.opentelemetry.proto.trace.v1.ScopeSpans.Builder getScopeSpansBuilder( int index) { return getScopeSpansFieldBuilder().getBuilder(index); } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public io.opentelemetry.proto.trace.v1.ScopeSpansOrBuilder getScopeSpansOrBuilder( int index) { if (scopeSpansBuilder_ == null) { return scopeSpans_.get(index); } else { return scopeSpansBuilder_.getMessageOrBuilder(index); } } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public java.util.List getScopeSpansOrBuilderList() { if (scopeSpansBuilder_ != null) { return scopeSpansBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(scopeSpans_); } } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public io.opentelemetry.proto.trace.v1.ScopeSpans.Builder addScopeSpansBuilder() { return getScopeSpansFieldBuilder().addBuilder( io.opentelemetry.proto.trace.v1.ScopeSpans.getDefaultInstance()); } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public io.opentelemetry.proto.trace.v1.ScopeSpans.Builder addScopeSpansBuilder( int index) { return getScopeSpansFieldBuilder().addBuilder( index, io.opentelemetry.proto.trace.v1.ScopeSpans.getDefaultInstance()); } /** *
     * A list of ScopeSpans that originate from a resource.
     * 
* * repeated .opentelemetry.proto.trace.v1.ScopeSpans scope_spans = 2; */ public java.util.List getScopeSpansBuilderList() { return getScopeSpansFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.trace.v1.ScopeSpans, io.opentelemetry.proto.trace.v1.ScopeSpans.Builder, io.opentelemetry.proto.trace.v1.ScopeSpansOrBuilder> getScopeSpansFieldBuilder() { if (scopeSpansBuilder_ == null) { scopeSpansBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentelemetry.proto.trace.v1.ScopeSpans, io.opentelemetry.proto.trace.v1.ScopeSpans.Builder, io.opentelemetry.proto.trace.v1.ScopeSpansOrBuilder>( scopeSpans_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); scopeSpans_ = null; } return scopeSpansBuilder_; } private java.lang.Object schemaUrl_ = ""; /** *
     * This schema_url applies to the data in the "resource" field. It does not apply
     * to the data in the "scope_spans" field which have their own schema_url 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 the data in the "resource" field. It does not apply
     * to the data in the "scope_spans" field which have their own schema_url 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 the data in the "resource" field. It does not apply
     * to the data in the "scope_spans" field which have their own schema_url 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 the data in the "resource" field. It does not apply
     * to the data in the "scope_spans" field which have their own schema_url field.
     * 
* * string schema_url = 3; * @return This builder for chaining. */ public Builder clearSchemaUrl() { schemaUrl_ = getDefaultInstance().getSchemaUrl(); onChanged(); return this; } /** *
     * This schema_url applies to the data in the "resource" field. It does not apply
     * to the data in the "scope_spans" field which have their own schema_url 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.ResourceSpans) } // @@protoc_insertion_point(class_scope:opentelemetry.proto.trace.v1.ResourceSpans) private static final io.opentelemetry.proto.trace.v1.ResourceSpans DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opentelemetry.proto.trace.v1.ResourceSpans(); } public static io.opentelemetry.proto.trace.v1.ResourceSpans getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ResourceSpans parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ResourceSpans(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.ResourceSpans getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy