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

com.expedia.open.tracing.Span Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: span.proto

package com.expedia.open.tracing;

/**
 * 
 * Span represents a unit of work performed by a service.
 * 
* * Protobuf type {@code Span} */ public final class Span extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:Span) SpanOrBuilder { // Use Span.newBuilder() to construct. private Span(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Span() { traceId_ = ""; spanId_ = ""; parentSpanId_ = ""; serviceName_ = ""; operationName_ = ""; startTime_ = 0L; duration_ = 0L; logs_ = java.util.Collections.emptyList(); tags_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private Span( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); traceId_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); spanId_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); parentSpanId_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); serviceName_ = s; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); operationName_ = s; break; } case 48: { startTime_ = input.readInt64(); break; } case 56: { duration_ = input.readInt64(); break; } case 66: { if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { logs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000080; } logs_.add( input.readMessage(com.expedia.open.tracing.Log.parser(), extensionRegistry)); break; } case 74: { if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { tags_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } tags_.add( input.readMessage(com.expedia.open.tracing.Tag.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { logs_ = java.util.Collections.unmodifiableList(logs_); } if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { tags_ = java.util.Collections.unmodifiableList(tags_); } makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.expedia.open.tracing.SpanOuterClass.internal_static_Span_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.expedia.open.tracing.SpanOuterClass.internal_static_Span_fieldAccessorTable .ensureFieldAccessorsInitialized( com.expedia.open.tracing.Span.class, com.expedia.open.tracing.Span.Builder.class); } private int bitField0_; public static final int TRACEID_FIELD_NUMBER = 1; private volatile java.lang.Object traceId_; /** *
   * unique trace id
   * 
* * optional string traceId = 1; */ public java.lang.String getTraceId() { java.lang.Object ref = traceId_; 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(); traceId_ = s; return s; } } /** *
   * unique trace id
   * 
* * optional string traceId = 1; */ public com.google.protobuf.ByteString getTraceIdBytes() { java.lang.Object ref = traceId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); traceId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SPANID_FIELD_NUMBER = 2; private volatile java.lang.Object spanId_; /** *
   * unique span id
   * 
* * optional string spanId = 2; */ public java.lang.String getSpanId() { java.lang.Object ref = spanId_; 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(); spanId_ = s; return s; } } /** *
   * unique span id
   * 
* * optional string spanId = 2; */ public com.google.protobuf.ByteString getSpanIdBytes() { java.lang.Object ref = spanId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); spanId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PARENTSPANID_FIELD_NUMBER = 3; private volatile java.lang.Object parentSpanId_; /** *
   * optional, a span can have its parent spanId
   * 
* * optional string parentSpanId = 3; */ public java.lang.String getParentSpanId() { java.lang.Object ref = parentSpanId_; 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(); parentSpanId_ = s; return s; } } /** *
   * optional, a span can have its parent spanId
   * 
* * optional string parentSpanId = 3; */ public com.google.protobuf.ByteString getParentSpanIdBytes() { java.lang.Object ref = parentSpanId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); parentSpanId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SERVICENAME_FIELD_NUMBER = 4; private volatile java.lang.Object serviceName_; /** *
   * name of service
   * 
* * optional string serviceName = 4; */ public java.lang.String getServiceName() { java.lang.Object ref = serviceName_; 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(); serviceName_ = s; return s; } } /** *
   * name of service
   * 
* * optional string serviceName = 4; */ public com.google.protobuf.ByteString getServiceNameBytes() { java.lang.Object ref = serviceName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); serviceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OPERATIONNAME_FIELD_NUMBER = 5; private volatile java.lang.Object operationName_; /** *
   * name of operation
   * 
* * optional string operationName = 5; */ public java.lang.String getOperationName() { java.lang.Object ref = operationName_; 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(); operationName_ = s; return s; } } /** *
   * name of operation
   * 
* * optional string operationName = 5; */ public com.google.protobuf.ByteString getOperationNameBytes() { java.lang.Object ref = operationName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); operationName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int STARTTIME_FIELD_NUMBER = 6; private long startTime_; /** *
   * creation time of this span in microseconds since epoch
   * 
* * optional int64 startTime = 6; */ public long getStartTime() { return startTime_; } public static final int DURATION_FIELD_NUMBER = 7; private long duration_; /** *
   * span duration in microseconds
   * 
* * optional int64 duration = 7; */ public long getDuration() { return duration_; } public static final int LOGS_FIELD_NUMBER = 8; private java.util.List logs_; /** *
   * arbitrary set of timestamp-aware key-value pairs
   * 
* * repeated .Log logs = 8; */ public java.util.List getLogsList() { return logs_; } /** *
   * arbitrary set of timestamp-aware key-value pairs
   * 
* * repeated .Log logs = 8; */ public java.util.List getLogsOrBuilderList() { return logs_; } /** *
   * arbitrary set of timestamp-aware key-value pairs
   * 
* * repeated .Log logs = 8; */ public int getLogsCount() { return logs_.size(); } /** *
   * arbitrary set of timestamp-aware key-value pairs
   * 
* * repeated .Log logs = 8; */ public com.expedia.open.tracing.Log getLogs(int index) { return logs_.get(index); } /** *
   * arbitrary set of timestamp-aware key-value pairs
   * 
* * repeated .Log logs = 8; */ public com.expedia.open.tracing.LogOrBuilder getLogsOrBuilder( int index) { return logs_.get(index); } public static final int TAGS_FIELD_NUMBER = 9; private java.util.List tags_; /** *
   * arbitrary set of key-value pairs
   * 
* * repeated .Tag tags = 9; */ public java.util.List getTagsList() { return tags_; } /** *
   * arbitrary set of key-value pairs
   * 
* * repeated .Tag tags = 9; */ public java.util.List getTagsOrBuilderList() { return tags_; } /** *
   * arbitrary set of key-value pairs
   * 
* * repeated .Tag tags = 9; */ public int getTagsCount() { return tags_.size(); } /** *
   * arbitrary set of key-value pairs
   * 
* * repeated .Tag tags = 9; */ public com.expedia.open.tracing.Tag getTags(int index) { return tags_.get(index); } /** *
   * arbitrary set of key-value pairs
   * 
* * repeated .Tag tags = 9; */ public com.expedia.open.tracing.TagOrBuilder getTagsOrBuilder( int index) { return tags_.get(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTraceIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, traceId_); } if (!getSpanIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, spanId_); } if (!getParentSpanIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, parentSpanId_); } if (!getServiceNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceName_); } if (!getOperationNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, operationName_); } if (startTime_ != 0L) { output.writeInt64(6, startTime_); } if (duration_ != 0L) { output.writeInt64(7, duration_); } for (int i = 0; i < logs_.size(); i++) { output.writeMessage(8, logs_.get(i)); } for (int i = 0; i < tags_.size(); i++) { output.writeMessage(9, tags_.get(i)); } } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTraceIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, traceId_); } if (!getSpanIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, spanId_); } if (!getParentSpanIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, parentSpanId_); } if (!getServiceNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceName_); } if (!getOperationNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, operationName_); } if (startTime_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, startTime_); } if (duration_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(7, duration_); } for (int i = 0; i < logs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, logs_.get(i)); } for (int i = 0; i < tags_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, tags_.get(i)); } memoizedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.expedia.open.tracing.Span)) { return super.equals(obj); } com.expedia.open.tracing.Span other = (com.expedia.open.tracing.Span) obj; boolean result = true; result = result && getTraceId() .equals(other.getTraceId()); result = result && getSpanId() .equals(other.getSpanId()); result = result && getParentSpanId() .equals(other.getParentSpanId()); result = result && getServiceName() .equals(other.getServiceName()); result = result && getOperationName() .equals(other.getOperationName()); result = result && (getStartTime() == other.getStartTime()); result = result && (getDuration() == other.getDuration()); result = result && getLogsList() .equals(other.getLogsList()); result = result && getTagsList() .equals(other.getTagsList()); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); hash = (37 * hash) + TRACEID_FIELD_NUMBER; hash = (53 * hash) + getTraceId().hashCode(); hash = (37 * hash) + SPANID_FIELD_NUMBER; hash = (53 * hash) + getSpanId().hashCode(); hash = (37 * hash) + PARENTSPANID_FIELD_NUMBER; hash = (53 * hash) + getParentSpanId().hashCode(); hash = (37 * hash) + SERVICENAME_FIELD_NUMBER; hash = (53 * hash) + getServiceName().hashCode(); hash = (37 * hash) + OPERATIONNAME_FIELD_NUMBER; hash = (53 * hash) + getOperationName().hashCode(); hash = (37 * hash) + STARTTIME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStartTime()); hash = (37 * hash) + DURATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getDuration()); if (getLogsCount() > 0) { hash = (37 * hash) + LOGS_FIELD_NUMBER; hash = (53 * hash) + getLogsList().hashCode(); } if (getTagsCount() > 0) { hash = (37 * hash) + TAGS_FIELD_NUMBER; hash = (53 * hash) + getTagsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.expedia.open.tracing.Span parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.expedia.open.tracing.Span parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.expedia.open.tracing.Span parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.expedia.open.tracing.Span parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.expedia.open.tracing.Span parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.expedia.open.tracing.Span 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 com.expedia.open.tracing.Span parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.expedia.open.tracing.Span 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 com.expedia.open.tracing.Span parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.expedia.open.tracing.Span parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.expedia.open.tracing.Span prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } 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; } /** *
   * Span represents a unit of work performed by a service.
   * 
* * Protobuf type {@code Span} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:Span) com.expedia.open.tracing.SpanOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.expedia.open.tracing.SpanOuterClass.internal_static_Span_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.expedia.open.tracing.SpanOuterClass.internal_static_Span_fieldAccessorTable .ensureFieldAccessorsInitialized( com.expedia.open.tracing.Span.class, com.expedia.open.tracing.Span.Builder.class); } // Construct using com.expedia.open.tracing.Span.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getLogsFieldBuilder(); getTagsFieldBuilder(); } } public Builder clear() { super.clear(); traceId_ = ""; spanId_ = ""; parentSpanId_ = ""; serviceName_ = ""; operationName_ = ""; startTime_ = 0L; duration_ = 0L; if (logsBuilder_ == null) { logs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000080); } else { logsBuilder_.clear(); } if (tagsBuilder_ == null) { tags_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000100); } else { tagsBuilder_.clear(); } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.expedia.open.tracing.SpanOuterClass.internal_static_Span_descriptor; } public com.expedia.open.tracing.Span getDefaultInstanceForType() { return com.expedia.open.tracing.Span.getDefaultInstance(); } public com.expedia.open.tracing.Span build() { com.expedia.open.tracing.Span result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.expedia.open.tracing.Span buildPartial() { com.expedia.open.tracing.Span result = new com.expedia.open.tracing.Span(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.traceId_ = traceId_; result.spanId_ = spanId_; result.parentSpanId_ = parentSpanId_; result.serviceName_ = serviceName_; result.operationName_ = operationName_; result.startTime_ = startTime_; result.duration_ = duration_; if (logsBuilder_ == null) { if (((bitField0_ & 0x00000080) == 0x00000080)) { logs_ = java.util.Collections.unmodifiableList(logs_); bitField0_ = (bitField0_ & ~0x00000080); } result.logs_ = logs_; } else { result.logs_ = logsBuilder_.build(); } if (tagsBuilder_ == null) { if (((bitField0_ & 0x00000100) == 0x00000100)) { tags_ = java.util.Collections.unmodifiableList(tags_); bitField0_ = (bitField0_ & ~0x00000100); } result.tags_ = tags_; } else { result.tags_ = tagsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.expedia.open.tracing.Span) { return mergeFrom((com.expedia.open.tracing.Span)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.expedia.open.tracing.Span other) { if (other == com.expedia.open.tracing.Span.getDefaultInstance()) return this; if (!other.getTraceId().isEmpty()) { traceId_ = other.traceId_; onChanged(); } if (!other.getSpanId().isEmpty()) { spanId_ = other.spanId_; onChanged(); } if (!other.getParentSpanId().isEmpty()) { parentSpanId_ = other.parentSpanId_; onChanged(); } if (!other.getServiceName().isEmpty()) { serviceName_ = other.serviceName_; onChanged(); } if (!other.getOperationName().isEmpty()) { operationName_ = other.operationName_; onChanged(); } if (other.getStartTime() != 0L) { setStartTime(other.getStartTime()); } if (other.getDuration() != 0L) { setDuration(other.getDuration()); } if (logsBuilder_ == null) { if (!other.logs_.isEmpty()) { if (logs_.isEmpty()) { logs_ = other.logs_; bitField0_ = (bitField0_ & ~0x00000080); } else { ensureLogsIsMutable(); logs_.addAll(other.logs_); } onChanged(); } } else { if (!other.logs_.isEmpty()) { if (logsBuilder_.isEmpty()) { logsBuilder_.dispose(); logsBuilder_ = null; logs_ = other.logs_; bitField0_ = (bitField0_ & ~0x00000080); logsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLogsFieldBuilder() : null; } else { logsBuilder_.addAllMessages(other.logs_); } } } if (tagsBuilder_ == null) { if (!other.tags_.isEmpty()) { if (tags_.isEmpty()) { tags_ = other.tags_; bitField0_ = (bitField0_ & ~0x00000100); } else { ensureTagsIsMutable(); tags_.addAll(other.tags_); } onChanged(); } } else { if (!other.tags_.isEmpty()) { if (tagsBuilder_.isEmpty()) { tagsBuilder_.dispose(); tagsBuilder_ = null; tags_ = other.tags_; bitField0_ = (bitField0_ & ~0x00000100); tagsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTagsFieldBuilder() : null; } else { tagsBuilder_.addAllMessages(other.tags_); } } } onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.expedia.open.tracing.Span parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.expedia.open.tracing.Span) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object traceId_ = ""; /** *
     * unique trace id
     * 
* * optional string traceId = 1; */ public java.lang.String getTraceId() { java.lang.Object ref = traceId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); traceId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * unique trace id
     * 
* * optional string traceId = 1; */ public com.google.protobuf.ByteString getTraceIdBytes() { java.lang.Object ref = traceId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); traceId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * unique trace id
     * 
* * optional string traceId = 1; */ public Builder setTraceId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } traceId_ = value; onChanged(); return this; } /** *
     * unique trace id
     * 
* * optional string traceId = 1; */ public Builder clearTraceId() { traceId_ = getDefaultInstance().getTraceId(); onChanged(); return this; } /** *
     * unique trace id
     * 
* * optional string traceId = 1; */ public Builder setTraceIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); traceId_ = value; onChanged(); return this; } private java.lang.Object spanId_ = ""; /** *
     * unique span id
     * 
* * optional string spanId = 2; */ public java.lang.String getSpanId() { java.lang.Object ref = spanId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); spanId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * unique span id
     * 
* * optional string spanId = 2; */ public com.google.protobuf.ByteString getSpanIdBytes() { java.lang.Object ref = spanId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); spanId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * unique span id
     * 
* * optional string spanId = 2; */ public Builder setSpanId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } spanId_ = value; onChanged(); return this; } /** *
     * unique span id
     * 
* * optional string spanId = 2; */ public Builder clearSpanId() { spanId_ = getDefaultInstance().getSpanId(); onChanged(); return this; } /** *
     * unique span id
     * 
* * optional string spanId = 2; */ public Builder setSpanIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); spanId_ = value; onChanged(); return this; } private java.lang.Object parentSpanId_ = ""; /** *
     * optional, a span can have its parent spanId
     * 
* * optional string parentSpanId = 3; */ public java.lang.String getParentSpanId() { java.lang.Object ref = parentSpanId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parentSpanId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * optional, a span can have its parent spanId
     * 
* * optional string parentSpanId = 3; */ public com.google.protobuf.ByteString getParentSpanIdBytes() { java.lang.Object ref = parentSpanId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); parentSpanId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * optional, a span can have its parent spanId
     * 
* * optional string parentSpanId = 3; */ public Builder setParentSpanId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } parentSpanId_ = value; onChanged(); return this; } /** *
     * optional, a span can have its parent spanId
     * 
* * optional string parentSpanId = 3; */ public Builder clearParentSpanId() { parentSpanId_ = getDefaultInstance().getParentSpanId(); onChanged(); return this; } /** *
     * optional, a span can have its parent spanId
     * 
* * optional string parentSpanId = 3; */ public Builder setParentSpanIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); parentSpanId_ = value; onChanged(); return this; } private java.lang.Object serviceName_ = ""; /** *
     * name of service
     * 
* * optional string serviceName = 4; */ public java.lang.String getServiceName() { java.lang.Object ref = serviceName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); serviceName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * name of service
     * 
* * optional string serviceName = 4; */ public com.google.protobuf.ByteString getServiceNameBytes() { java.lang.Object ref = serviceName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); serviceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * name of service
     * 
* * optional string serviceName = 4; */ public Builder setServiceName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } serviceName_ = value; onChanged(); return this; } /** *
     * name of service
     * 
* * optional string serviceName = 4; */ public Builder clearServiceName() { serviceName_ = getDefaultInstance().getServiceName(); onChanged(); return this; } /** *
     * name of service
     * 
* * optional string serviceName = 4; */ public Builder setServiceNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); serviceName_ = value; onChanged(); return this; } private java.lang.Object operationName_ = ""; /** *
     * name of operation
     * 
* * optional string operationName = 5; */ public java.lang.String getOperationName() { java.lang.Object ref = operationName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); operationName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * name of operation
     * 
* * optional string operationName = 5; */ public com.google.protobuf.ByteString getOperationNameBytes() { java.lang.Object ref = operationName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); operationName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * name of operation
     * 
* * optional string operationName = 5; */ public Builder setOperationName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } operationName_ = value; onChanged(); return this; } /** *
     * name of operation
     * 
* * optional string operationName = 5; */ public Builder clearOperationName() { operationName_ = getDefaultInstance().getOperationName(); onChanged(); return this; } /** *
     * name of operation
     * 
* * optional string operationName = 5; */ public Builder setOperationNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); operationName_ = value; onChanged(); return this; } private long startTime_ ; /** *
     * creation time of this span in microseconds since epoch
     * 
* * optional int64 startTime = 6; */ public long getStartTime() { return startTime_; } /** *
     * creation time of this span in microseconds since epoch
     * 
* * optional int64 startTime = 6; */ public Builder setStartTime(long value) { startTime_ = value; onChanged(); return this; } /** *
     * creation time of this span in microseconds since epoch
     * 
* * optional int64 startTime = 6; */ public Builder clearStartTime() { startTime_ = 0L; onChanged(); return this; } private long duration_ ; /** *
     * span duration in microseconds
     * 
* * optional int64 duration = 7; */ public long getDuration() { return duration_; } /** *
     * span duration in microseconds
     * 
* * optional int64 duration = 7; */ public Builder setDuration(long value) { duration_ = value; onChanged(); return this; } /** *
     * span duration in microseconds
     * 
* * optional int64 duration = 7; */ public Builder clearDuration() { duration_ = 0L; onChanged(); return this; } private java.util.List logs_ = java.util.Collections.emptyList(); private void ensureLogsIsMutable() { if (!((bitField0_ & 0x00000080) == 0x00000080)) { logs_ = new java.util.ArrayList(logs_); bitField0_ |= 0x00000080; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.expedia.open.tracing.Log, com.expedia.open.tracing.Log.Builder, com.expedia.open.tracing.LogOrBuilder> logsBuilder_; /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public java.util.List getLogsList() { if (logsBuilder_ == null) { return java.util.Collections.unmodifiableList(logs_); } else { return logsBuilder_.getMessageList(); } } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public int getLogsCount() { if (logsBuilder_ == null) { return logs_.size(); } else { return logsBuilder_.getCount(); } } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public com.expedia.open.tracing.Log getLogs(int index) { if (logsBuilder_ == null) { return logs_.get(index); } else { return logsBuilder_.getMessage(index); } } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder setLogs( int index, com.expedia.open.tracing.Log value) { if (logsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLogsIsMutable(); logs_.set(index, value); onChanged(); } else { logsBuilder_.setMessage(index, value); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder setLogs( int index, com.expedia.open.tracing.Log.Builder builderForValue) { if (logsBuilder_ == null) { ensureLogsIsMutable(); logs_.set(index, builderForValue.build()); onChanged(); } else { logsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder addLogs(com.expedia.open.tracing.Log value) { if (logsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLogsIsMutable(); logs_.add(value); onChanged(); } else { logsBuilder_.addMessage(value); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder addLogs( int index, com.expedia.open.tracing.Log value) { if (logsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLogsIsMutable(); logs_.add(index, value); onChanged(); } else { logsBuilder_.addMessage(index, value); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder addLogs( com.expedia.open.tracing.Log.Builder builderForValue) { if (logsBuilder_ == null) { ensureLogsIsMutable(); logs_.add(builderForValue.build()); onChanged(); } else { logsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder addLogs( int index, com.expedia.open.tracing.Log.Builder builderForValue) { if (logsBuilder_ == null) { ensureLogsIsMutable(); logs_.add(index, builderForValue.build()); onChanged(); } else { logsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder addAllLogs( java.lang.Iterable values) { if (logsBuilder_ == null) { ensureLogsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, logs_); onChanged(); } else { logsBuilder_.addAllMessages(values); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder clearLogs() { if (logsBuilder_ == null) { logs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { logsBuilder_.clear(); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public Builder removeLogs(int index) { if (logsBuilder_ == null) { ensureLogsIsMutable(); logs_.remove(index); onChanged(); } else { logsBuilder_.remove(index); } return this; } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public com.expedia.open.tracing.Log.Builder getLogsBuilder( int index) { return getLogsFieldBuilder().getBuilder(index); } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public com.expedia.open.tracing.LogOrBuilder getLogsOrBuilder( int index) { if (logsBuilder_ == null) { return logs_.get(index); } else { return logsBuilder_.getMessageOrBuilder(index); } } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public java.util.List getLogsOrBuilderList() { if (logsBuilder_ != null) { return logsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(logs_); } } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public com.expedia.open.tracing.Log.Builder addLogsBuilder() { return getLogsFieldBuilder().addBuilder( com.expedia.open.tracing.Log.getDefaultInstance()); } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public com.expedia.open.tracing.Log.Builder addLogsBuilder( int index) { return getLogsFieldBuilder().addBuilder( index, com.expedia.open.tracing.Log.getDefaultInstance()); } /** *
     * arbitrary set of timestamp-aware key-value pairs
     * 
* * repeated .Log logs = 8; */ public java.util.List getLogsBuilderList() { return getLogsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.expedia.open.tracing.Log, com.expedia.open.tracing.Log.Builder, com.expedia.open.tracing.LogOrBuilder> getLogsFieldBuilder() { if (logsBuilder_ == null) { logsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.expedia.open.tracing.Log, com.expedia.open.tracing.Log.Builder, com.expedia.open.tracing.LogOrBuilder>( logs_, ((bitField0_ & 0x00000080) == 0x00000080), getParentForChildren(), isClean()); logs_ = null; } return logsBuilder_; } private java.util.List tags_ = java.util.Collections.emptyList(); private void ensureTagsIsMutable() { if (!((bitField0_ & 0x00000100) == 0x00000100)) { tags_ = new java.util.ArrayList(tags_); bitField0_ |= 0x00000100; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.expedia.open.tracing.Tag, com.expedia.open.tracing.Tag.Builder, com.expedia.open.tracing.TagOrBuilder> tagsBuilder_; /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public java.util.List getTagsList() { if (tagsBuilder_ == null) { return java.util.Collections.unmodifiableList(tags_); } else { return tagsBuilder_.getMessageList(); } } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public int getTagsCount() { if (tagsBuilder_ == null) { return tags_.size(); } else { return tagsBuilder_.getCount(); } } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public com.expedia.open.tracing.Tag getTags(int index) { if (tagsBuilder_ == null) { return tags_.get(index); } else { return tagsBuilder_.getMessage(index); } } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder setTags( int index, com.expedia.open.tracing.Tag value) { if (tagsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTagsIsMutable(); tags_.set(index, value); onChanged(); } else { tagsBuilder_.setMessage(index, value); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder setTags( int index, com.expedia.open.tracing.Tag.Builder builderForValue) { if (tagsBuilder_ == null) { ensureTagsIsMutable(); tags_.set(index, builderForValue.build()); onChanged(); } else { tagsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder addTags(com.expedia.open.tracing.Tag value) { if (tagsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTagsIsMutable(); tags_.add(value); onChanged(); } else { tagsBuilder_.addMessage(value); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder addTags( int index, com.expedia.open.tracing.Tag value) { if (tagsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTagsIsMutable(); tags_.add(index, value); onChanged(); } else { tagsBuilder_.addMessage(index, value); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder addTags( com.expedia.open.tracing.Tag.Builder builderForValue) { if (tagsBuilder_ == null) { ensureTagsIsMutable(); tags_.add(builderForValue.build()); onChanged(); } else { tagsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder addTags( int index, com.expedia.open.tracing.Tag.Builder builderForValue) { if (tagsBuilder_ == null) { ensureTagsIsMutable(); tags_.add(index, builderForValue.build()); onChanged(); } else { tagsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder addAllTags( java.lang.Iterable values) { if (tagsBuilder_ == null) { ensureTagsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, tags_); onChanged(); } else { tagsBuilder_.addAllMessages(values); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder clearTags() { if (tagsBuilder_ == null) { tags_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { tagsBuilder_.clear(); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public Builder removeTags(int index) { if (tagsBuilder_ == null) { ensureTagsIsMutable(); tags_.remove(index); onChanged(); } else { tagsBuilder_.remove(index); } return this; } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public com.expedia.open.tracing.Tag.Builder getTagsBuilder( int index) { return getTagsFieldBuilder().getBuilder(index); } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public com.expedia.open.tracing.TagOrBuilder getTagsOrBuilder( int index) { if (tagsBuilder_ == null) { return tags_.get(index); } else { return tagsBuilder_.getMessageOrBuilder(index); } } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public java.util.List getTagsOrBuilderList() { if (tagsBuilder_ != null) { return tagsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(tags_); } } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public com.expedia.open.tracing.Tag.Builder addTagsBuilder() { return getTagsFieldBuilder().addBuilder( com.expedia.open.tracing.Tag.getDefaultInstance()); } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public com.expedia.open.tracing.Tag.Builder addTagsBuilder( int index) { return getTagsFieldBuilder().addBuilder( index, com.expedia.open.tracing.Tag.getDefaultInstance()); } /** *
     * arbitrary set of key-value pairs
     * 
* * repeated .Tag tags = 9; */ public java.util.List getTagsBuilderList() { return getTagsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.expedia.open.tracing.Tag, com.expedia.open.tracing.Tag.Builder, com.expedia.open.tracing.TagOrBuilder> getTagsFieldBuilder() { if (tagsBuilder_ == null) { tagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.expedia.open.tracing.Tag, com.expedia.open.tracing.Tag.Builder, com.expedia.open.tracing.TagOrBuilder>( tags_, ((bitField0_ & 0x00000100) == 0x00000100), getParentForChildren(), isClean()); tags_ = null; } return tagsBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return this; } // @@protoc_insertion_point(builder_scope:Span) } // @@protoc_insertion_point(class_scope:Span) private static final com.expedia.open.tracing.Span DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.expedia.open.tracing.Span(); } public static com.expedia.open.tracing.Span getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Span parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Span(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.expedia.open.tracing.Span getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy