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

io.opencensus.proto.trace.v1.TraceConfig Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: opencensus/proto/trace/v1/trace_config.proto

package io.opencensus.proto.trace.v1;

/**
 * 
 * Global configuration of the trace service. All fields must be specified, or
 * the default (zero) values will be used for each type.
 * 
* * Protobuf type {@code opencensus.proto.trace.v1.TraceConfig} */ public final class TraceConfig extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencensus.proto.trace.v1.TraceConfig) TraceConfigOrBuilder { private static final long serialVersionUID = 0L; // Use TraceConfig.newBuilder() to construct. private TraceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TraceConfig() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new TraceConfig(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TraceConfig( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } 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.opencensus.proto.trace.v1.ProbabilitySampler.Builder subBuilder = null; if (samplerCase_ == 1) { subBuilder = ((io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_).toBuilder(); } sampler_ = input.readMessage(io.opencensus.proto.trace.v1.ProbabilitySampler.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_); sampler_ = subBuilder.buildPartial(); } samplerCase_ = 1; break; } case 18: { io.opencensus.proto.trace.v1.ConstantSampler.Builder subBuilder = null; if (samplerCase_ == 2) { subBuilder = ((io.opencensus.proto.trace.v1.ConstantSampler) sampler_).toBuilder(); } sampler_ = input.readMessage(io.opencensus.proto.trace.v1.ConstantSampler.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opencensus.proto.trace.v1.ConstantSampler) sampler_); sampler_ = subBuilder.buildPartial(); } samplerCase_ = 2; break; } case 26: { io.opencensus.proto.trace.v1.RateLimitingSampler.Builder subBuilder = null; if (samplerCase_ == 3) { subBuilder = ((io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_).toBuilder(); } sampler_ = input.readMessage(io.opencensus.proto.trace.v1.RateLimitingSampler.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_); sampler_ = subBuilder.buildPartial(); } samplerCase_ = 3; break; } case 32: { maxNumberOfAttributes_ = input.readInt64(); break; } case 40: { maxNumberOfAnnotations_ = input.readInt64(); break; } case 48: { maxNumberOfMessageEvents_ = input.readInt64(); break; } case 56: { maxNumberOfLinks_ = input.readInt64(); 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencensus.proto.trace.v1.TraceConfigProto.internal_static_opencensus_proto_trace_v1_TraceConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencensus.proto.trace.v1.TraceConfigProto.internal_static_opencensus_proto_trace_v1_TraceConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencensus.proto.trace.v1.TraceConfig.class, io.opencensus.proto.trace.v1.TraceConfig.Builder.class); } private int samplerCase_ = 0; private java.lang.Object sampler_; public enum SamplerCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { PROBABILITY_SAMPLER(1), CONSTANT_SAMPLER(2), RATE_LIMITING_SAMPLER(3), SAMPLER_NOT_SET(0); private final int value; private SamplerCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SamplerCase valueOf(int value) { return forNumber(value); } public static SamplerCase forNumber(int value) { switch (value) { case 1: return PROBABILITY_SAMPLER; case 2: return CONSTANT_SAMPLER; case 3: return RATE_LIMITING_SAMPLER; case 0: return SAMPLER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public SamplerCase getSamplerCase() { return SamplerCase.forNumber( samplerCase_); } public static final int PROBABILITY_SAMPLER_FIELD_NUMBER = 1; /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; * @return Whether the probabilitySampler field is set. */ @java.lang.Override public boolean hasProbabilitySampler() { return samplerCase_ == 1; } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; * @return The probabilitySampler. */ @java.lang.Override public io.opencensus.proto.trace.v1.ProbabilitySampler getProbabilitySampler() { if (samplerCase_ == 1) { return (io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_; } return io.opencensus.proto.trace.v1.ProbabilitySampler.getDefaultInstance(); } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ @java.lang.Override public io.opencensus.proto.trace.v1.ProbabilitySamplerOrBuilder getProbabilitySamplerOrBuilder() { if (samplerCase_ == 1) { return (io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_; } return io.opencensus.proto.trace.v1.ProbabilitySampler.getDefaultInstance(); } public static final int CONSTANT_SAMPLER_FIELD_NUMBER = 2; /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; * @return Whether the constantSampler field is set. */ @java.lang.Override public boolean hasConstantSampler() { return samplerCase_ == 2; } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; * @return The constantSampler. */ @java.lang.Override public io.opencensus.proto.trace.v1.ConstantSampler getConstantSampler() { if (samplerCase_ == 2) { return (io.opencensus.proto.trace.v1.ConstantSampler) sampler_; } return io.opencensus.proto.trace.v1.ConstantSampler.getDefaultInstance(); } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ @java.lang.Override public io.opencensus.proto.trace.v1.ConstantSamplerOrBuilder getConstantSamplerOrBuilder() { if (samplerCase_ == 2) { return (io.opencensus.proto.trace.v1.ConstantSampler) sampler_; } return io.opencensus.proto.trace.v1.ConstantSampler.getDefaultInstance(); } public static final int RATE_LIMITING_SAMPLER_FIELD_NUMBER = 3; /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; * @return Whether the rateLimitingSampler field is set. */ @java.lang.Override public boolean hasRateLimitingSampler() { return samplerCase_ == 3; } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; * @return The rateLimitingSampler. */ @java.lang.Override public io.opencensus.proto.trace.v1.RateLimitingSampler getRateLimitingSampler() { if (samplerCase_ == 3) { return (io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_; } return io.opencensus.proto.trace.v1.RateLimitingSampler.getDefaultInstance(); } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ @java.lang.Override public io.opencensus.proto.trace.v1.RateLimitingSamplerOrBuilder getRateLimitingSamplerOrBuilder() { if (samplerCase_ == 3) { return (io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_; } return io.opencensus.proto.trace.v1.RateLimitingSampler.getDefaultInstance(); } public static final int MAX_NUMBER_OF_ATTRIBUTES_FIELD_NUMBER = 4; private long maxNumberOfAttributes_; /** *
   * The global default max number of attributes per span.
   * 
* * int64 max_number_of_attributes = 4; * @return The maxNumberOfAttributes. */ @java.lang.Override public long getMaxNumberOfAttributes() { return maxNumberOfAttributes_; } public static final int MAX_NUMBER_OF_ANNOTATIONS_FIELD_NUMBER = 5; private long maxNumberOfAnnotations_; /** *
   * The global default max number of annotation events per span.
   * 
* * int64 max_number_of_annotations = 5; * @return The maxNumberOfAnnotations. */ @java.lang.Override public long getMaxNumberOfAnnotations() { return maxNumberOfAnnotations_; } public static final int MAX_NUMBER_OF_MESSAGE_EVENTS_FIELD_NUMBER = 6; private long maxNumberOfMessageEvents_; /** *
   * The global default max number of message events per span.
   * 
* * int64 max_number_of_message_events = 6; * @return The maxNumberOfMessageEvents. */ @java.lang.Override public long getMaxNumberOfMessageEvents() { return maxNumberOfMessageEvents_; } public static final int MAX_NUMBER_OF_LINKS_FIELD_NUMBER = 7; private long maxNumberOfLinks_; /** *
   * The global default max number of link entries per span.
   * 
* * int64 max_number_of_links = 7; * @return The maxNumberOfLinks. */ @java.lang.Override public long getMaxNumberOfLinks() { return maxNumberOfLinks_; } 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 (samplerCase_ == 1) { output.writeMessage(1, (io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_); } if (samplerCase_ == 2) { output.writeMessage(2, (io.opencensus.proto.trace.v1.ConstantSampler) sampler_); } if (samplerCase_ == 3) { output.writeMessage(3, (io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_); } if (maxNumberOfAttributes_ != 0L) { output.writeInt64(4, maxNumberOfAttributes_); } if (maxNumberOfAnnotations_ != 0L) { output.writeInt64(5, maxNumberOfAnnotations_); } if (maxNumberOfMessageEvents_ != 0L) { output.writeInt64(6, maxNumberOfMessageEvents_); } if (maxNumberOfLinks_ != 0L) { output.writeInt64(7, maxNumberOfLinks_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (samplerCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_); } if (samplerCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (io.opencensus.proto.trace.v1.ConstantSampler) sampler_); } if (samplerCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_); } if (maxNumberOfAttributes_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, maxNumberOfAttributes_); } if (maxNumberOfAnnotations_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, maxNumberOfAnnotations_); } if (maxNumberOfMessageEvents_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, maxNumberOfMessageEvents_); } if (maxNumberOfLinks_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(7, maxNumberOfLinks_); } 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.opencensus.proto.trace.v1.TraceConfig)) { return super.equals(obj); } io.opencensus.proto.trace.v1.TraceConfig other = (io.opencensus.proto.trace.v1.TraceConfig) obj; if (getMaxNumberOfAttributes() != other.getMaxNumberOfAttributes()) return false; if (getMaxNumberOfAnnotations() != other.getMaxNumberOfAnnotations()) return false; if (getMaxNumberOfMessageEvents() != other.getMaxNumberOfMessageEvents()) return false; if (getMaxNumberOfLinks() != other.getMaxNumberOfLinks()) return false; if (!getSamplerCase().equals(other.getSamplerCase())) return false; switch (samplerCase_) { case 1: if (!getProbabilitySampler() .equals(other.getProbabilitySampler())) return false; break; case 2: if (!getConstantSampler() .equals(other.getConstantSampler())) return false; break; case 3: if (!getRateLimitingSampler() .equals(other.getRateLimitingSampler())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MAX_NUMBER_OF_ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxNumberOfAttributes()); hash = (37 * hash) + MAX_NUMBER_OF_ANNOTATIONS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxNumberOfAnnotations()); hash = (37 * hash) + MAX_NUMBER_OF_MESSAGE_EVENTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxNumberOfMessageEvents()); hash = (37 * hash) + MAX_NUMBER_OF_LINKS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxNumberOfLinks()); switch (samplerCase_) { case 1: hash = (37 * hash) + PROBABILITY_SAMPLER_FIELD_NUMBER; hash = (53 * hash) + getProbabilitySampler().hashCode(); break; case 2: hash = (37 * hash) + CONSTANT_SAMPLER_FIELD_NUMBER; hash = (53 * hash) + getConstantSampler().hashCode(); break; case 3: hash = (37 * hash) + RATE_LIMITING_SAMPLER_FIELD_NUMBER; hash = (53 * hash) + getRateLimitingSampler().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencensus.proto.trace.v1.TraceConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencensus.proto.trace.v1.TraceConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencensus.proto.trace.v1.TraceConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencensus.proto.trace.v1.TraceConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencensus.proto.trace.v1.TraceConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencensus.proto.trace.v1.TraceConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencensus.proto.trace.v1.TraceConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencensus.proto.trace.v1.TraceConfig 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.opencensus.proto.trace.v1.TraceConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencensus.proto.trace.v1.TraceConfig 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.opencensus.proto.trace.v1.TraceConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencensus.proto.trace.v1.TraceConfig 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.opencensus.proto.trace.v1.TraceConfig 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; } /** *
   * Global configuration of the trace service. All fields must be specified, or
   * the default (zero) values will be used for each type.
   * 
* * Protobuf type {@code opencensus.proto.trace.v1.TraceConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencensus.proto.trace.v1.TraceConfig) io.opencensus.proto.trace.v1.TraceConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencensus.proto.trace.v1.TraceConfigProto.internal_static_opencensus_proto_trace_v1_TraceConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencensus.proto.trace.v1.TraceConfigProto.internal_static_opencensus_proto_trace_v1_TraceConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencensus.proto.trace.v1.TraceConfig.class, io.opencensus.proto.trace.v1.TraceConfig.Builder.class); } // Construct using io.opencensus.proto.trace.v1.TraceConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); maxNumberOfAttributes_ = 0L; maxNumberOfAnnotations_ = 0L; maxNumberOfMessageEvents_ = 0L; maxNumberOfLinks_ = 0L; samplerCase_ = 0; sampler_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencensus.proto.trace.v1.TraceConfigProto.internal_static_opencensus_proto_trace_v1_TraceConfig_descriptor; } @java.lang.Override public io.opencensus.proto.trace.v1.TraceConfig getDefaultInstanceForType() { return io.opencensus.proto.trace.v1.TraceConfig.getDefaultInstance(); } @java.lang.Override public io.opencensus.proto.trace.v1.TraceConfig build() { io.opencensus.proto.trace.v1.TraceConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencensus.proto.trace.v1.TraceConfig buildPartial() { io.opencensus.proto.trace.v1.TraceConfig result = new io.opencensus.proto.trace.v1.TraceConfig(this); if (samplerCase_ == 1) { if (probabilitySamplerBuilder_ == null) { result.sampler_ = sampler_; } else { result.sampler_ = probabilitySamplerBuilder_.build(); } } if (samplerCase_ == 2) { if (constantSamplerBuilder_ == null) { result.sampler_ = sampler_; } else { result.sampler_ = constantSamplerBuilder_.build(); } } if (samplerCase_ == 3) { if (rateLimitingSamplerBuilder_ == null) { result.sampler_ = sampler_; } else { result.sampler_ = rateLimitingSamplerBuilder_.build(); } } result.maxNumberOfAttributes_ = maxNumberOfAttributes_; result.maxNumberOfAnnotations_ = maxNumberOfAnnotations_; result.maxNumberOfMessageEvents_ = maxNumberOfMessageEvents_; result.maxNumberOfLinks_ = maxNumberOfLinks_; result.samplerCase_ = samplerCase_; 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.opencensus.proto.trace.v1.TraceConfig) { return mergeFrom((io.opencensus.proto.trace.v1.TraceConfig)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencensus.proto.trace.v1.TraceConfig other) { if (other == io.opencensus.proto.trace.v1.TraceConfig.getDefaultInstance()) return this; if (other.getMaxNumberOfAttributes() != 0L) { setMaxNumberOfAttributes(other.getMaxNumberOfAttributes()); } if (other.getMaxNumberOfAnnotations() != 0L) { setMaxNumberOfAnnotations(other.getMaxNumberOfAnnotations()); } if (other.getMaxNumberOfMessageEvents() != 0L) { setMaxNumberOfMessageEvents(other.getMaxNumberOfMessageEvents()); } if (other.getMaxNumberOfLinks() != 0L) { setMaxNumberOfLinks(other.getMaxNumberOfLinks()); } switch (other.getSamplerCase()) { case PROBABILITY_SAMPLER: { mergeProbabilitySampler(other.getProbabilitySampler()); break; } case CONSTANT_SAMPLER: { mergeConstantSampler(other.getConstantSampler()); break; } case RATE_LIMITING_SAMPLER: { mergeRateLimitingSampler(other.getRateLimitingSampler()); break; } case SAMPLER_NOT_SET: { break; } } 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.opencensus.proto.trace.v1.TraceConfig parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencensus.proto.trace.v1.TraceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int samplerCase_ = 0; private java.lang.Object sampler_; public SamplerCase getSamplerCase() { return SamplerCase.forNumber( samplerCase_); } public Builder clearSampler() { samplerCase_ = 0; sampler_ = null; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.ProbabilitySampler, io.opencensus.proto.trace.v1.ProbabilitySampler.Builder, io.opencensus.proto.trace.v1.ProbabilitySamplerOrBuilder> probabilitySamplerBuilder_; /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; * @return Whether the probabilitySampler field is set. */ @java.lang.Override public boolean hasProbabilitySampler() { return samplerCase_ == 1; } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; * @return The probabilitySampler. */ @java.lang.Override public io.opencensus.proto.trace.v1.ProbabilitySampler getProbabilitySampler() { if (probabilitySamplerBuilder_ == null) { if (samplerCase_ == 1) { return (io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_; } return io.opencensus.proto.trace.v1.ProbabilitySampler.getDefaultInstance(); } else { if (samplerCase_ == 1) { return probabilitySamplerBuilder_.getMessage(); } return io.opencensus.proto.trace.v1.ProbabilitySampler.getDefaultInstance(); } } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ public Builder setProbabilitySampler(io.opencensus.proto.trace.v1.ProbabilitySampler value) { if (probabilitySamplerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sampler_ = value; onChanged(); } else { probabilitySamplerBuilder_.setMessage(value); } samplerCase_ = 1; return this; } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ public Builder setProbabilitySampler( io.opencensus.proto.trace.v1.ProbabilitySampler.Builder builderForValue) { if (probabilitySamplerBuilder_ == null) { sampler_ = builderForValue.build(); onChanged(); } else { probabilitySamplerBuilder_.setMessage(builderForValue.build()); } samplerCase_ = 1; return this; } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ public Builder mergeProbabilitySampler(io.opencensus.proto.trace.v1.ProbabilitySampler value) { if (probabilitySamplerBuilder_ == null) { if (samplerCase_ == 1 && sampler_ != io.opencensus.proto.trace.v1.ProbabilitySampler.getDefaultInstance()) { sampler_ = io.opencensus.proto.trace.v1.ProbabilitySampler.newBuilder((io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_) .mergeFrom(value).buildPartial(); } else { sampler_ = value; } onChanged(); } else { if (samplerCase_ == 1) { probabilitySamplerBuilder_.mergeFrom(value); } else { probabilitySamplerBuilder_.setMessage(value); } } samplerCase_ = 1; return this; } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ public Builder clearProbabilitySampler() { if (probabilitySamplerBuilder_ == null) { if (samplerCase_ == 1) { samplerCase_ = 0; sampler_ = null; onChanged(); } } else { if (samplerCase_ == 1) { samplerCase_ = 0; sampler_ = null; } probabilitySamplerBuilder_.clear(); } return this; } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ public io.opencensus.proto.trace.v1.ProbabilitySampler.Builder getProbabilitySamplerBuilder() { return getProbabilitySamplerFieldBuilder().getBuilder(); } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ @java.lang.Override public io.opencensus.proto.trace.v1.ProbabilitySamplerOrBuilder getProbabilitySamplerOrBuilder() { if ((samplerCase_ == 1) && (probabilitySamplerBuilder_ != null)) { return probabilitySamplerBuilder_.getMessageOrBuilder(); } else { if (samplerCase_ == 1) { return (io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_; } return io.opencensus.proto.trace.v1.ProbabilitySampler.getDefaultInstance(); } } /** * .opencensus.proto.trace.v1.ProbabilitySampler probability_sampler = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.ProbabilitySampler, io.opencensus.proto.trace.v1.ProbabilitySampler.Builder, io.opencensus.proto.trace.v1.ProbabilitySamplerOrBuilder> getProbabilitySamplerFieldBuilder() { if (probabilitySamplerBuilder_ == null) { if (!(samplerCase_ == 1)) { sampler_ = io.opencensus.proto.trace.v1.ProbabilitySampler.getDefaultInstance(); } probabilitySamplerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.ProbabilitySampler, io.opencensus.proto.trace.v1.ProbabilitySampler.Builder, io.opencensus.proto.trace.v1.ProbabilitySamplerOrBuilder>( (io.opencensus.proto.trace.v1.ProbabilitySampler) sampler_, getParentForChildren(), isClean()); sampler_ = null; } samplerCase_ = 1; onChanged();; return probabilitySamplerBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.ConstantSampler, io.opencensus.proto.trace.v1.ConstantSampler.Builder, io.opencensus.proto.trace.v1.ConstantSamplerOrBuilder> constantSamplerBuilder_; /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; * @return Whether the constantSampler field is set. */ @java.lang.Override public boolean hasConstantSampler() { return samplerCase_ == 2; } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; * @return The constantSampler. */ @java.lang.Override public io.opencensus.proto.trace.v1.ConstantSampler getConstantSampler() { if (constantSamplerBuilder_ == null) { if (samplerCase_ == 2) { return (io.opencensus.proto.trace.v1.ConstantSampler) sampler_; } return io.opencensus.proto.trace.v1.ConstantSampler.getDefaultInstance(); } else { if (samplerCase_ == 2) { return constantSamplerBuilder_.getMessage(); } return io.opencensus.proto.trace.v1.ConstantSampler.getDefaultInstance(); } } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ public Builder setConstantSampler(io.opencensus.proto.trace.v1.ConstantSampler value) { if (constantSamplerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sampler_ = value; onChanged(); } else { constantSamplerBuilder_.setMessage(value); } samplerCase_ = 2; return this; } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ public Builder setConstantSampler( io.opencensus.proto.trace.v1.ConstantSampler.Builder builderForValue) { if (constantSamplerBuilder_ == null) { sampler_ = builderForValue.build(); onChanged(); } else { constantSamplerBuilder_.setMessage(builderForValue.build()); } samplerCase_ = 2; return this; } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ public Builder mergeConstantSampler(io.opencensus.proto.trace.v1.ConstantSampler value) { if (constantSamplerBuilder_ == null) { if (samplerCase_ == 2 && sampler_ != io.opencensus.proto.trace.v1.ConstantSampler.getDefaultInstance()) { sampler_ = io.opencensus.proto.trace.v1.ConstantSampler.newBuilder((io.opencensus.proto.trace.v1.ConstantSampler) sampler_) .mergeFrom(value).buildPartial(); } else { sampler_ = value; } onChanged(); } else { if (samplerCase_ == 2) { constantSamplerBuilder_.mergeFrom(value); } else { constantSamplerBuilder_.setMessage(value); } } samplerCase_ = 2; return this; } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ public Builder clearConstantSampler() { if (constantSamplerBuilder_ == null) { if (samplerCase_ == 2) { samplerCase_ = 0; sampler_ = null; onChanged(); } } else { if (samplerCase_ == 2) { samplerCase_ = 0; sampler_ = null; } constantSamplerBuilder_.clear(); } return this; } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ public io.opencensus.proto.trace.v1.ConstantSampler.Builder getConstantSamplerBuilder() { return getConstantSamplerFieldBuilder().getBuilder(); } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ @java.lang.Override public io.opencensus.proto.trace.v1.ConstantSamplerOrBuilder getConstantSamplerOrBuilder() { if ((samplerCase_ == 2) && (constantSamplerBuilder_ != null)) { return constantSamplerBuilder_.getMessageOrBuilder(); } else { if (samplerCase_ == 2) { return (io.opencensus.proto.trace.v1.ConstantSampler) sampler_; } return io.opencensus.proto.trace.v1.ConstantSampler.getDefaultInstance(); } } /** * .opencensus.proto.trace.v1.ConstantSampler constant_sampler = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.ConstantSampler, io.opencensus.proto.trace.v1.ConstantSampler.Builder, io.opencensus.proto.trace.v1.ConstantSamplerOrBuilder> getConstantSamplerFieldBuilder() { if (constantSamplerBuilder_ == null) { if (!(samplerCase_ == 2)) { sampler_ = io.opencensus.proto.trace.v1.ConstantSampler.getDefaultInstance(); } constantSamplerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.ConstantSampler, io.opencensus.proto.trace.v1.ConstantSampler.Builder, io.opencensus.proto.trace.v1.ConstantSamplerOrBuilder>( (io.opencensus.proto.trace.v1.ConstantSampler) sampler_, getParentForChildren(), isClean()); sampler_ = null; } samplerCase_ = 2; onChanged();; return constantSamplerBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.RateLimitingSampler, io.opencensus.proto.trace.v1.RateLimitingSampler.Builder, io.opencensus.proto.trace.v1.RateLimitingSamplerOrBuilder> rateLimitingSamplerBuilder_; /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; * @return Whether the rateLimitingSampler field is set. */ @java.lang.Override public boolean hasRateLimitingSampler() { return samplerCase_ == 3; } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; * @return The rateLimitingSampler. */ @java.lang.Override public io.opencensus.proto.trace.v1.RateLimitingSampler getRateLimitingSampler() { if (rateLimitingSamplerBuilder_ == null) { if (samplerCase_ == 3) { return (io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_; } return io.opencensus.proto.trace.v1.RateLimitingSampler.getDefaultInstance(); } else { if (samplerCase_ == 3) { return rateLimitingSamplerBuilder_.getMessage(); } return io.opencensus.proto.trace.v1.RateLimitingSampler.getDefaultInstance(); } } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ public Builder setRateLimitingSampler(io.opencensus.proto.trace.v1.RateLimitingSampler value) { if (rateLimitingSamplerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } sampler_ = value; onChanged(); } else { rateLimitingSamplerBuilder_.setMessage(value); } samplerCase_ = 3; return this; } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ public Builder setRateLimitingSampler( io.opencensus.proto.trace.v1.RateLimitingSampler.Builder builderForValue) { if (rateLimitingSamplerBuilder_ == null) { sampler_ = builderForValue.build(); onChanged(); } else { rateLimitingSamplerBuilder_.setMessage(builderForValue.build()); } samplerCase_ = 3; return this; } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ public Builder mergeRateLimitingSampler(io.opencensus.proto.trace.v1.RateLimitingSampler value) { if (rateLimitingSamplerBuilder_ == null) { if (samplerCase_ == 3 && sampler_ != io.opencensus.proto.trace.v1.RateLimitingSampler.getDefaultInstance()) { sampler_ = io.opencensus.proto.trace.v1.RateLimitingSampler.newBuilder((io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_) .mergeFrom(value).buildPartial(); } else { sampler_ = value; } onChanged(); } else { if (samplerCase_ == 3) { rateLimitingSamplerBuilder_.mergeFrom(value); } else { rateLimitingSamplerBuilder_.setMessage(value); } } samplerCase_ = 3; return this; } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ public Builder clearRateLimitingSampler() { if (rateLimitingSamplerBuilder_ == null) { if (samplerCase_ == 3) { samplerCase_ = 0; sampler_ = null; onChanged(); } } else { if (samplerCase_ == 3) { samplerCase_ = 0; sampler_ = null; } rateLimitingSamplerBuilder_.clear(); } return this; } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ public io.opencensus.proto.trace.v1.RateLimitingSampler.Builder getRateLimitingSamplerBuilder() { return getRateLimitingSamplerFieldBuilder().getBuilder(); } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ @java.lang.Override public io.opencensus.proto.trace.v1.RateLimitingSamplerOrBuilder getRateLimitingSamplerOrBuilder() { if ((samplerCase_ == 3) && (rateLimitingSamplerBuilder_ != null)) { return rateLimitingSamplerBuilder_.getMessageOrBuilder(); } else { if (samplerCase_ == 3) { return (io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_; } return io.opencensus.proto.trace.v1.RateLimitingSampler.getDefaultInstance(); } } /** * .opencensus.proto.trace.v1.RateLimitingSampler rate_limiting_sampler = 3; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.RateLimitingSampler, io.opencensus.proto.trace.v1.RateLimitingSampler.Builder, io.opencensus.proto.trace.v1.RateLimitingSamplerOrBuilder> getRateLimitingSamplerFieldBuilder() { if (rateLimitingSamplerBuilder_ == null) { if (!(samplerCase_ == 3)) { sampler_ = io.opencensus.proto.trace.v1.RateLimitingSampler.getDefaultInstance(); } rateLimitingSamplerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencensus.proto.trace.v1.RateLimitingSampler, io.opencensus.proto.trace.v1.RateLimitingSampler.Builder, io.opencensus.proto.trace.v1.RateLimitingSamplerOrBuilder>( (io.opencensus.proto.trace.v1.RateLimitingSampler) sampler_, getParentForChildren(), isClean()); sampler_ = null; } samplerCase_ = 3; onChanged();; return rateLimitingSamplerBuilder_; } private long maxNumberOfAttributes_ ; /** *
     * The global default max number of attributes per span.
     * 
* * int64 max_number_of_attributes = 4; * @return The maxNumberOfAttributes. */ @java.lang.Override public long getMaxNumberOfAttributes() { return maxNumberOfAttributes_; } /** *
     * The global default max number of attributes per span.
     * 
* * int64 max_number_of_attributes = 4; * @param value The maxNumberOfAttributes to set. * @return This builder for chaining. */ public Builder setMaxNumberOfAttributes(long value) { maxNumberOfAttributes_ = value; onChanged(); return this; } /** *
     * The global default max number of attributes per span.
     * 
* * int64 max_number_of_attributes = 4; * @return This builder for chaining. */ public Builder clearMaxNumberOfAttributes() { maxNumberOfAttributes_ = 0L; onChanged(); return this; } private long maxNumberOfAnnotations_ ; /** *
     * The global default max number of annotation events per span.
     * 
* * int64 max_number_of_annotations = 5; * @return The maxNumberOfAnnotations. */ @java.lang.Override public long getMaxNumberOfAnnotations() { return maxNumberOfAnnotations_; } /** *
     * The global default max number of annotation events per span.
     * 
* * int64 max_number_of_annotations = 5; * @param value The maxNumberOfAnnotations to set. * @return This builder for chaining. */ public Builder setMaxNumberOfAnnotations(long value) { maxNumberOfAnnotations_ = value; onChanged(); return this; } /** *
     * The global default max number of annotation events per span.
     * 
* * int64 max_number_of_annotations = 5; * @return This builder for chaining. */ public Builder clearMaxNumberOfAnnotations() { maxNumberOfAnnotations_ = 0L; onChanged(); return this; } private long maxNumberOfMessageEvents_ ; /** *
     * The global default max number of message events per span.
     * 
* * int64 max_number_of_message_events = 6; * @return The maxNumberOfMessageEvents. */ @java.lang.Override public long getMaxNumberOfMessageEvents() { return maxNumberOfMessageEvents_; } /** *
     * The global default max number of message events per span.
     * 
* * int64 max_number_of_message_events = 6; * @param value The maxNumberOfMessageEvents to set. * @return This builder for chaining. */ public Builder setMaxNumberOfMessageEvents(long value) { maxNumberOfMessageEvents_ = value; onChanged(); return this; } /** *
     * The global default max number of message events per span.
     * 
* * int64 max_number_of_message_events = 6; * @return This builder for chaining. */ public Builder clearMaxNumberOfMessageEvents() { maxNumberOfMessageEvents_ = 0L; onChanged(); return this; } private long maxNumberOfLinks_ ; /** *
     * The global default max number of link entries per span.
     * 
* * int64 max_number_of_links = 7; * @return The maxNumberOfLinks. */ @java.lang.Override public long getMaxNumberOfLinks() { return maxNumberOfLinks_; } /** *
     * The global default max number of link entries per span.
     * 
* * int64 max_number_of_links = 7; * @param value The maxNumberOfLinks to set. * @return This builder for chaining. */ public Builder setMaxNumberOfLinks(long value) { maxNumberOfLinks_ = value; onChanged(); return this; } /** *
     * The global default max number of link entries per span.
     * 
* * int64 max_number_of_links = 7; * @return This builder for chaining. */ public Builder clearMaxNumberOfLinks() { maxNumberOfLinks_ = 0L; 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:opencensus.proto.trace.v1.TraceConfig) } // @@protoc_insertion_point(class_scope:opencensus.proto.trace.v1.TraceConfig) private static final io.opencensus.proto.trace.v1.TraceConfig DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencensus.proto.trace.v1.TraceConfig(); } public static io.opencensus.proto.trace.v1.TraceConfig getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TraceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TraceConfig(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.opencensus.proto.trace.v1.TraceConfig getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy