Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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.
*