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: envoy/config/trace/v2/lightstep.proto
package io.envoyproxy.envoy.config.trace.v2;
/**
*
* Configuration for the LightStep tracer.
* [#extension: envoy.tracers.lightstep]
*
*
* Protobuf type {@code envoy.config.trace.v2.LightstepConfig}
*/
public final class LightstepConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.trace.v2.LightstepConfig)
LightstepConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use LightstepConfig.newBuilder() to construct.
private LightstepConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LightstepConfig() {
collectorCluster_ = "";
accessTokenFile_ = "";
propagationModes_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LightstepConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LightstepConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
collectorCluster_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
accessTokenFile_ = s;
break;
}
case 24: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
propagationModes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
propagationModes_.add(rawValue);
break;
}
case 26: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
propagationModes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
propagationModes_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
propagationModes_ = java.util.Collections.unmodifiableList(propagationModes_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.trace.v2.LightstepProto.internal_static_envoy_config_trace_v2_LightstepConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.trace.v2.LightstepProto.internal_static_envoy_config_trace_v2_LightstepConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.trace.v2.LightstepConfig.class, io.envoyproxy.envoy.config.trace.v2.LightstepConfig.Builder.class);
}
/**
*
* Propagate trace context in the single header x-ot-span-context.
*
*
* ENVOY = 0;
*/
public static final int ENVOY_VALUE = 0;
/**
*
* Propagate trace context using LightStep's native format.
*
*
* LIGHTSTEP = 1;
*/
public static final int LIGHTSTEP_VALUE = 1;
/**
*
* Propagate trace context using the b3 format.
*
*
* B3 = 2;
*/
public static final int B3_VALUE = 2;
/**
*
* Propagation trace context using the w3 trace-context standard.
*
*
* TRACE_CONTEXT = 3;
*/
public static final int TRACE_CONTEXT_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PropagationMode valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static PropagationMode forNumber(int value) {
switch (value) {
case 0: return ENVOY;
case 1: return LIGHTSTEP;
case 2: return B3;
case 3: return TRACE_CONTEXT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PropagationMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public PropagationMode findValueByNumber(int number) {
return PropagationMode.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.envoyproxy.envoy.config.trace.v2.LightstepConfig.getDescriptor().getEnumTypes().get(0);
}
private static final PropagationMode[] VALUES = values();
public static PropagationMode valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PropagationMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.config.trace.v2.LightstepConfig.PropagationMode)
}
public static final int COLLECTOR_CLUSTER_FIELD_NUMBER = 1;
private volatile java.lang.Object collectorCluster_;
/**
*
* The cluster manager cluster that hosts the LightStep collectors.
*
* File containing the access token to the `LightStep
* <https://lightstep.com/>`_ API.
*
*
* string access_token_file = 2 [(.validate.rules) = { ... }
* @return The bytes for accessTokenFile.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAccessTokenFileBytes() {
java.lang.Object ref = accessTokenFile_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
accessTokenFile_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROPAGATION_MODES_FIELD_NUMBER = 3;
private java.util.List propagationModes_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode> propagationModes_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode>() {
public io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode result = io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode.valueOf(from);
return result == null ? io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode.UNRECOGNIZED : result;
}
};
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @return A list containing the propagationModes.
*/
@java.lang.Override
public java.util.List getPropagationModesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode>(propagationModes_, propagationModes_converter_);
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @return The count of propagationModes.
*/
@java.lang.Override
public int getPropagationModesCount() {
return propagationModes_.size();
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param index The index of the element to return.
* @return The propagationModes at the given index.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode getPropagationModes(int index) {
return propagationModes_converter_.convert(propagationModes_.get(index));
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @return A list containing the enum numeric values on the wire for propagationModes.
*/
@java.lang.Override
public java.util.List
getPropagationModesValueList() {
return propagationModes_;
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param index The index of the value to return.
* @return The enum numeric value on the wire of propagationModes at the given index.
*/
@java.lang.Override
public int getPropagationModesValue(int index) {
return propagationModes_.get(index);
}
private int propagationModesMemoizedSerializedSize;
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 {
getSerializedSize();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectorCluster_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, collectorCluster_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessTokenFile_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accessTokenFile_);
}
if (getPropagationModesList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(propagationModesMemoizedSerializedSize);
}
for (int i = 0; i < propagationModes_.size(); i++) {
output.writeEnumNoTag(propagationModes_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(collectorCluster_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, collectorCluster_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessTokenFile_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accessTokenFile_);
}
{
int dataSize = 0;
for (int i = 0; i < propagationModes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(propagationModes_.get(i));
}
size += dataSize;
if (!getPropagationModesList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}propagationModesMemoizedSerializedSize = dataSize;
}
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.envoyproxy.envoy.config.trace.v2.LightstepConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.trace.v2.LightstepConfig other = (io.envoyproxy.envoy.config.trace.v2.LightstepConfig) obj;
if (!getCollectorCluster()
.equals(other.getCollectorCluster())) return false;
if (!getAccessTokenFile()
.equals(other.getAccessTokenFile())) return false;
if (!propagationModes_.equals(other.propagationModes_)) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + COLLECTOR_CLUSTER_FIELD_NUMBER;
hash = (53 * hash) + getCollectorCluster().hashCode();
hash = (37 * hash) + ACCESS_TOKEN_FILE_FIELD_NUMBER;
hash = (53 * hash) + getAccessTokenFile().hashCode();
if (getPropagationModesCount() > 0) {
hash = (37 * hash) + PROPAGATION_MODES_FIELD_NUMBER;
hash = (53 * hash) + propagationModes_.hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig 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.envoyproxy.envoy.config.trace.v2.LightstepConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig 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.envoyproxy.envoy.config.trace.v2.LightstepConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig 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.envoyproxy.envoy.config.trace.v2.LightstepConfig 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;
}
/**
*
* Configuration for the LightStep tracer.
* [#extension: envoy.tracers.lightstep]
*
*
* Protobuf type {@code envoy.config.trace.v2.LightstepConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.trace.v2.LightstepConfig)
io.envoyproxy.envoy.config.trace.v2.LightstepConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.trace.v2.LightstepProto.internal_static_envoy_config_trace_v2_LightstepConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.trace.v2.LightstepProto.internal_static_envoy_config_trace_v2_LightstepConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.trace.v2.LightstepConfig.class, io.envoyproxy.envoy.config.trace.v2.LightstepConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.trace.v2.LightstepConfig.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();
collectorCluster_ = "";
accessTokenFile_ = "";
propagationModes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.trace.v2.LightstepProto.internal_static_envoy_config_trace_v2_LightstepConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.LightstepConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.trace.v2.LightstepConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.LightstepConfig build() {
io.envoyproxy.envoy.config.trace.v2.LightstepConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.LightstepConfig buildPartial() {
io.envoyproxy.envoy.config.trace.v2.LightstepConfig result = new io.envoyproxy.envoy.config.trace.v2.LightstepConfig(this);
int from_bitField0_ = bitField0_;
result.collectorCluster_ = collectorCluster_;
result.accessTokenFile_ = accessTokenFile_;
if (((bitField0_ & 0x00000001) != 0)) {
propagationModes_ = java.util.Collections.unmodifiableList(propagationModes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.propagationModes_ = propagationModes_;
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.envoyproxy.envoy.config.trace.v2.LightstepConfig) {
return mergeFrom((io.envoyproxy.envoy.config.trace.v2.LightstepConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.trace.v2.LightstepConfig other) {
if (other == io.envoyproxy.envoy.config.trace.v2.LightstepConfig.getDefaultInstance()) return this;
if (!other.getCollectorCluster().isEmpty()) {
collectorCluster_ = other.collectorCluster_;
onChanged();
}
if (!other.getAccessTokenFile().isEmpty()) {
accessTokenFile_ = other.accessTokenFile_;
onChanged();
}
if (!other.propagationModes_.isEmpty()) {
if (propagationModes_.isEmpty()) {
propagationModes_ = other.propagationModes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePropagationModesIsMutable();
propagationModes_.addAll(other.propagationModes_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.envoyproxy.envoy.config.trace.v2.LightstepConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.trace.v2.LightstepConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object collectorCluster_ = "";
/**
*
* The cluster manager cluster that hosts the LightStep collectors.
*
* File containing the access token to the `LightStep
* <https://lightstep.com/>`_ API.
*
*
* string access_token_file = 2 [(.validate.rules) = { ... }
* @param value The bytes for accessTokenFile to set.
* @return This builder for chaining.
*/
public Builder setAccessTokenFileBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
accessTokenFile_ = value;
onChanged();
return this;
}
private java.util.List propagationModes_ =
java.util.Collections.emptyList();
private void ensurePropagationModesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
propagationModes_ = new java.util.ArrayList(propagationModes_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @return A list containing the propagationModes.
*/
public java.util.List getPropagationModesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode>(propagationModes_, propagationModes_converter_);
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @return The count of propagationModes.
*/
public int getPropagationModesCount() {
return propagationModes_.size();
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param index The index of the element to return.
* @return The propagationModes at the given index.
*/
public io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode getPropagationModes(int index) {
return propagationModes_converter_.convert(propagationModes_.get(index));
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param index The index to set the value at.
* @param value The propagationModes to set.
* @return This builder for chaining.
*/
public Builder setPropagationModes(
int index, io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode value) {
if (value == null) {
throw new NullPointerException();
}
ensurePropagationModesIsMutable();
propagationModes_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param value The propagationModes to add.
* @return This builder for chaining.
*/
public Builder addPropagationModes(io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode value) {
if (value == null) {
throw new NullPointerException();
}
ensurePropagationModesIsMutable();
propagationModes_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param values The propagationModes to add.
* @return This builder for chaining.
*/
public Builder addAllPropagationModes(
java.lang.Iterable extends io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode> values) {
ensurePropagationModesIsMutable();
for (io.envoyproxy.envoy.config.trace.v2.LightstepConfig.PropagationMode value : values) {
propagationModes_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @return A list containing the enum numeric values on the wire for propagationModes.
*/
public java.util.List
getPropagationModesValueList() {
return java.util.Collections.unmodifiableList(propagationModes_);
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param index The index of the value to return.
* @return The enum numeric value on the wire of propagationModes at the given index.
*/
public int getPropagationModesValue(int index) {
return propagationModes_.get(index);
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for propagationModes to set.
* @return This builder for chaining.
*/
public Builder setPropagationModesValue(
int index, int value) {
ensurePropagationModesIsMutable();
propagationModes_.set(index, value);
onChanged();
return this;
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param value The enum numeric value on the wire for propagationModes to add.
* @return This builder for chaining.
*/
public Builder addPropagationModesValue(int value) {
ensurePropagationModesIsMutable();
propagationModes_.add(value);
onChanged();
return this;
}
/**
*
* Propagation modes to use by LightStep's tracer.
*
*
* repeated .envoy.config.trace.v2.LightstepConfig.PropagationMode propagation_modes = 3 [(.validate.rules) = { ... }
* @param values The enum numeric values on the wire for propagationModes to add.
* @return This builder for chaining.
*/
public Builder addAllPropagationModesValue(
java.lang.Iterable values) {
ensurePropagationModesIsMutable();
for (int value : values) {
propagationModes_.add(value);
}
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.config.trace.v2.LightstepConfig)
}
// @@protoc_insertion_point(class_scope:envoy.config.trace.v2.LightstepConfig)
private static final io.envoyproxy.envoy.config.trace.v2.LightstepConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.trace.v2.LightstepConfig();
}
public static io.envoyproxy.envoy.config.trace.v2.LightstepConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LightstepConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LightstepConfig(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.envoyproxy.envoy.config.trace.v2.LightstepConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}