io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/config/trace/v2/opencensus.proto
package io.envoyproxy.envoy.config.trace.v2;
/**
*
* Configuration for the OpenCensus tracer.
* [#next-free-field: 15]
* [#extension: envoy.tracers.opencensus]
*
*
* Protobuf type {@code envoy.config.trace.v2.OpenCensusConfig}
*/
public final class OpenCensusConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.config.trace.v2.OpenCensusConfig)
OpenCensusConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use OpenCensusConfig.newBuilder() to construct.
private OpenCensusConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OpenCensusConfig() {
stackdriverProjectId_ = "";
stackdriverAddress_ = "";
zipkinUrl_ = "";
ocagentAddress_ = "";
incomingTraceContext_ = java.util.Collections.emptyList();
outgoingTraceContext_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new OpenCensusConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OpenCensusConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.opencensus.proto.trace.v1.TraceConfig.Builder subBuilder = null;
if (traceConfig_ != null) {
subBuilder = traceConfig_.toBuilder();
}
traceConfig_ = input.readMessage(io.opencensus.proto.trace.v1.TraceConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(traceConfig_);
traceConfig_ = subBuilder.buildPartial();
}
break;
}
case 16: {
stdoutExporterEnabled_ = input.readBool();
break;
}
case 24: {
stackdriverExporterEnabled_ = input.readBool();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
stackdriverProjectId_ = s;
break;
}
case 40: {
zipkinExporterEnabled_ = input.readBool();
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
zipkinUrl_ = s;
break;
}
case 64: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
incomingTraceContext_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
incomingTraceContext_.add(rawValue);
break;
}
case 66: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
incomingTraceContext_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
incomingTraceContext_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 72: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
outgoingTraceContext_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
outgoingTraceContext_.add(rawValue);
break;
}
case 74: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
outgoingTraceContext_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
outgoingTraceContext_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
stackdriverAddress_ = s;
break;
}
case 88: {
ocagentExporterEnabled_ = input.readBool();
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
ocagentAddress_ = s;
break;
}
case 106: {
io.envoyproxy.envoy.api.v2.core.GrpcService.Builder subBuilder = null;
if (stackdriverGrpcService_ != null) {
subBuilder = stackdriverGrpcService_.toBuilder();
}
stackdriverGrpcService_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.GrpcService.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(stackdriverGrpcService_);
stackdriverGrpcService_ = subBuilder.buildPartial();
}
break;
}
case 114: {
io.envoyproxy.envoy.api.v2.core.GrpcService.Builder subBuilder = null;
if (ocagentGrpcService_ != null) {
subBuilder = ocagentGrpcService_.toBuilder();
}
ocagentGrpcService_ = input.readMessage(io.envoyproxy.envoy.api.v2.core.GrpcService.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(ocagentGrpcService_);
ocagentGrpcService_ = subBuilder.buildPartial();
}
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)) {
incomingTraceContext_ = java.util.Collections.unmodifiableList(incomingTraceContext_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
outgoingTraceContext_ = java.util.Collections.unmodifiableList(outgoingTraceContext_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.trace.v2.OpencensusProto.internal_static_envoy_config_trace_v2_OpenCensusConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.trace.v2.OpencensusProto.internal_static_envoy_config_trace_v2_OpenCensusConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.class, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.Builder.class);
}
/**
* Protobuf enum {@code envoy.config.trace.v2.OpenCensusConfig.TraceContext}
*/
public enum TraceContext
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* No-op default, no trace context is utilized.
*
*
* NONE = 0;
*/
NONE(0),
/**
*
* W3C Trace-Context format "traceparent:" header.
*
*
* TRACE_CONTEXT = 1;
*/
TRACE_CONTEXT(1),
/**
*
* Binary "grpc-trace-bin:" header.
*
*
* GRPC_TRACE_BIN = 2;
*/
GRPC_TRACE_BIN(2),
/**
*
* "X-Cloud-Trace-Context:" header.
*
*
* CLOUD_TRACE_CONTEXT = 3;
*/
CLOUD_TRACE_CONTEXT(3),
/**
*
* X-B3-* headers.
*
*
* B3 = 4;
*/
B3(4),
UNRECOGNIZED(-1),
;
/**
*
* No-op default, no trace context is utilized.
*
*
* NONE = 0;
*/
public static final int NONE_VALUE = 0;
/**
*
* W3C Trace-Context format "traceparent:" header.
*
*
* TRACE_CONTEXT = 1;
*/
public static final int TRACE_CONTEXT_VALUE = 1;
/**
*
* Binary "grpc-trace-bin:" header.
*
*
* GRPC_TRACE_BIN = 2;
*/
public static final int GRPC_TRACE_BIN_VALUE = 2;
/**
*
* "X-Cloud-Trace-Context:" header.
*
*
* CLOUD_TRACE_CONTEXT = 3;
*/
public static final int CLOUD_TRACE_CONTEXT_VALUE = 3;
/**
*
* X-B3-* headers.
*
*
* B3 = 4;
*/
public static final int B3_VALUE = 4;
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 TraceContext 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 TraceContext forNumber(int value) {
switch (value) {
case 0: return NONE;
case 1: return TRACE_CONTEXT;
case 2: return GRPC_TRACE_BIN;
case 3: return CLOUD_TRACE_CONTEXT;
case 4: return B3;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TraceContext> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TraceContext findValueByNumber(int number) {
return TraceContext.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.OpenCensusConfig.getDescriptor().getEnumTypes().get(0);
}
private static final TraceContext[] VALUES = values();
public static TraceContext 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 TraceContext(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.config.trace.v2.OpenCensusConfig.TraceContext)
}
public static final int TRACE_CONFIG_FIELD_NUMBER = 1;
private io.opencensus.proto.trace.v1.TraceConfig traceConfig_;
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
* @return Whether the traceConfig field is set.
*/
@java.lang.Override
public boolean hasTraceConfig() {
return traceConfig_ != null;
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
* @return The traceConfig.
*/
@java.lang.Override
public io.opencensus.proto.trace.v1.TraceConfig getTraceConfig() {
return traceConfig_ == null ? io.opencensus.proto.trace.v1.TraceConfig.getDefaultInstance() : traceConfig_;
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
@java.lang.Override
public io.opencensus.proto.trace.v1.TraceConfigOrBuilder getTraceConfigOrBuilder() {
return getTraceConfig();
}
public static final int STDOUT_EXPORTER_ENABLED_FIELD_NUMBER = 2;
private boolean stdoutExporterEnabled_;
/**
*
* Enables the stdout exporter if set to true. This is intended for debugging
* purposes.
*
*
* bool stdout_exporter_enabled = 2;
* @return The stdoutExporterEnabled.
*/
@java.lang.Override
public boolean getStdoutExporterEnabled() {
return stdoutExporterEnabled_;
}
public static final int STACKDRIVER_EXPORTER_ENABLED_FIELD_NUMBER = 3;
private boolean stackdriverExporterEnabled_;
/**
*
* Enables the Stackdriver exporter if set to true. The project_id must also
* be set.
*
*
* bool stackdriver_exporter_enabled = 3;
* @return The stackdriverExporterEnabled.
*/
@java.lang.Override
public boolean getStackdriverExporterEnabled() {
return stackdriverExporterEnabled_;
}
public static final int STACKDRIVER_PROJECT_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object stackdriverProjectId_;
/**
*
* The Cloud project_id to use for Stackdriver tracing.
*
*
* string stackdriver_project_id = 4;
* @return The stackdriverProjectId.
*/
@java.lang.Override
public java.lang.String getStackdriverProjectId() {
java.lang.Object ref = stackdriverProjectId_;
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();
stackdriverProjectId_ = s;
return s;
}
}
/**
*
* The Cloud project_id to use for Stackdriver tracing.
*
*
* string stackdriver_project_id = 4;
* @return The bytes for stackdriverProjectId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStackdriverProjectIdBytes() {
java.lang.Object ref = stackdriverProjectId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stackdriverProjectId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STACKDRIVER_ADDRESS_FIELD_NUMBER = 10;
private volatile java.lang.Object stackdriverAddress_;
/**
*
* (optional) By default, the Stackdriver exporter will connect to production
* Stackdriver. If stackdriver_address is non-empty, it will instead connect
* to this address, which is in the gRPC format:
* https://github.com/grpc/grpc/blob/master/doc/naming.md
*
*
* string stackdriver_address = 10;
* @return The stackdriverAddress.
*/
@java.lang.Override
public java.lang.String getStackdriverAddress() {
java.lang.Object ref = stackdriverAddress_;
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();
stackdriverAddress_ = s;
return s;
}
}
/**
*
* (optional) By default, the Stackdriver exporter will connect to production
* Stackdriver. If stackdriver_address is non-empty, it will instead connect
* to this address, which is in the gRPC format:
* https://github.com/grpc/grpc/blob/master/doc/naming.md
*
*
* string stackdriver_address = 10;
* @return The bytes for stackdriverAddress.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStackdriverAddressBytes() {
java.lang.Object ref = stackdriverAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stackdriverAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STACKDRIVER_GRPC_SERVICE_FIELD_NUMBER = 13;
private io.envoyproxy.envoy.api.v2.core.GrpcService stackdriverGrpcService_;
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
* @return Whether the stackdriverGrpcService field is set.
*/
@java.lang.Override
public boolean hasStackdriverGrpcService() {
return stackdriverGrpcService_ != null;
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
* @return The stackdriverGrpcService.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.GrpcService getStackdriverGrpcService() {
return stackdriverGrpcService_ == null ? io.envoyproxy.envoy.api.v2.core.GrpcService.getDefaultInstance() : stackdriverGrpcService_;
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder getStackdriverGrpcServiceOrBuilder() {
return getStackdriverGrpcService();
}
public static final int ZIPKIN_EXPORTER_ENABLED_FIELD_NUMBER = 5;
private boolean zipkinExporterEnabled_;
/**
*
* Enables the Zipkin exporter if set to true. The url and service name must
* also be set.
*
*
* bool zipkin_exporter_enabled = 5;
* @return The zipkinExporterEnabled.
*/
@java.lang.Override
public boolean getZipkinExporterEnabled() {
return zipkinExporterEnabled_;
}
public static final int ZIPKIN_URL_FIELD_NUMBER = 6;
private volatile java.lang.Object zipkinUrl_;
/**
*
* The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
*
*
* string zipkin_url = 6;
* @return The zipkinUrl.
*/
@java.lang.Override
public java.lang.String getZipkinUrl() {
java.lang.Object ref = zipkinUrl_;
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();
zipkinUrl_ = s;
return s;
}
}
/**
*
* The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
*
*
* string zipkin_url = 6;
* @return The bytes for zipkinUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getZipkinUrlBytes() {
java.lang.Object ref = zipkinUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zipkinUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OCAGENT_EXPORTER_ENABLED_FIELD_NUMBER = 11;
private boolean ocagentExporterEnabled_;
/**
*
* Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
* ocagent_grpc_service must also be set.
*
*
* bool ocagent_exporter_enabled = 11;
* @return The ocagentExporterEnabled.
*/
@java.lang.Override
public boolean getOcagentExporterEnabled() {
return ocagentExporterEnabled_;
}
public static final int OCAGENT_ADDRESS_FIELD_NUMBER = 12;
private volatile java.lang.Object ocagentAddress_;
/**
*
* The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
* format: https://github.com/grpc/grpc/blob/master/doc/naming.md
* [#comment:TODO: deprecate this field]
*
*
* string ocagent_address = 12;
* @return The ocagentAddress.
*/
@java.lang.Override
public java.lang.String getOcagentAddress() {
java.lang.Object ref = ocagentAddress_;
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();
ocagentAddress_ = s;
return s;
}
}
/**
*
* The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
* format: https://github.com/grpc/grpc/blob/master/doc/naming.md
* [#comment:TODO: deprecate this field]
*
*
* string ocagent_address = 12;
* @return The bytes for ocagentAddress.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getOcagentAddressBytes() {
java.lang.Object ref = ocagentAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ocagentAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OCAGENT_GRPC_SERVICE_FIELD_NUMBER = 14;
private io.envoyproxy.envoy.api.v2.core.GrpcService ocagentGrpcService_;
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
* @return Whether the ocagentGrpcService field is set.
*/
@java.lang.Override
public boolean hasOcagentGrpcService() {
return ocagentGrpcService_ != null;
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
* @return The ocagentGrpcService.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.GrpcService getOcagentGrpcService() {
return ocagentGrpcService_ == null ? io.envoyproxy.envoy.api.v2.core.GrpcService.getDefaultInstance() : ocagentGrpcService_;
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder getOcagentGrpcServiceOrBuilder() {
return getOcagentGrpcService();
}
public static final int INCOMING_TRACE_CONTEXT_FIELD_NUMBER = 8;
private java.util.List incomingTraceContext_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext> incomingTraceContext_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext>() {
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext result = io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext.valueOf(from);
return result == null ? io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext.UNRECOGNIZED : result;
}
};
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @return A list containing the incomingTraceContext.
*/
@java.lang.Override
public java.util.List getIncomingTraceContextList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext>(incomingTraceContext_, incomingTraceContext_converter_);
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @return The count of incomingTraceContext.
*/
@java.lang.Override
public int getIncomingTraceContextCount() {
return incomingTraceContext_.size();
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param index The index of the element to return.
* @return The incomingTraceContext at the given index.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext getIncomingTraceContext(int index) {
return incomingTraceContext_converter_.convert(incomingTraceContext_.get(index));
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @return A list containing the enum numeric values on the wire for incomingTraceContext.
*/
@java.lang.Override
public java.util.List
getIncomingTraceContextValueList() {
return incomingTraceContext_;
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of incomingTraceContext at the given index.
*/
@java.lang.Override
public int getIncomingTraceContextValue(int index) {
return incomingTraceContext_.get(index);
}
private int incomingTraceContextMemoizedSerializedSize;
public static final int OUTGOING_TRACE_CONTEXT_FIELD_NUMBER = 9;
private java.util.List outgoingTraceContext_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext> outgoingTraceContext_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext>() {
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext result = io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext.valueOf(from);
return result == null ? io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext.UNRECOGNIZED : result;
}
};
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @return A list containing the outgoingTraceContext.
*/
@java.lang.Override
public java.util.List getOutgoingTraceContextList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext>(outgoingTraceContext_, outgoingTraceContext_converter_);
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @return The count of outgoingTraceContext.
*/
@java.lang.Override
public int getOutgoingTraceContextCount() {
return outgoingTraceContext_.size();
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param index The index of the element to return.
* @return The outgoingTraceContext at the given index.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext getOutgoingTraceContext(int index) {
return outgoingTraceContext_converter_.convert(outgoingTraceContext_.get(index));
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @return A list containing the enum numeric values on the wire for outgoingTraceContext.
*/
@java.lang.Override
public java.util.List
getOutgoingTraceContextValueList() {
return outgoingTraceContext_;
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of outgoingTraceContext at the given index.
*/
@java.lang.Override
public int getOutgoingTraceContextValue(int index) {
return outgoingTraceContext_.get(index);
}
private int outgoingTraceContextMemoizedSerializedSize;
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 (traceConfig_ != null) {
output.writeMessage(1, getTraceConfig());
}
if (stdoutExporterEnabled_ != false) {
output.writeBool(2, stdoutExporterEnabled_);
}
if (stackdriverExporterEnabled_ != false) {
output.writeBool(3, stackdriverExporterEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stackdriverProjectId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, stackdriverProjectId_);
}
if (zipkinExporterEnabled_ != false) {
output.writeBool(5, zipkinExporterEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zipkinUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, zipkinUrl_);
}
if (getIncomingTraceContextList().size() > 0) {
output.writeUInt32NoTag(66);
output.writeUInt32NoTag(incomingTraceContextMemoizedSerializedSize);
}
for (int i = 0; i < incomingTraceContext_.size(); i++) {
output.writeEnumNoTag(incomingTraceContext_.get(i));
}
if (getOutgoingTraceContextList().size() > 0) {
output.writeUInt32NoTag(74);
output.writeUInt32NoTag(outgoingTraceContextMemoizedSerializedSize);
}
for (int i = 0; i < outgoingTraceContext_.size(); i++) {
output.writeEnumNoTag(outgoingTraceContext_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stackdriverAddress_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, stackdriverAddress_);
}
if (ocagentExporterEnabled_ != false) {
output.writeBool(11, ocagentExporterEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ocagentAddress_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, ocagentAddress_);
}
if (stackdriverGrpcService_ != null) {
output.writeMessage(13, getStackdriverGrpcService());
}
if (ocagentGrpcService_ != null) {
output.writeMessage(14, getOcagentGrpcService());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (traceConfig_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTraceConfig());
}
if (stdoutExporterEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, stdoutExporterEnabled_);
}
if (stackdriverExporterEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, stackdriverExporterEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stackdriverProjectId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, stackdriverProjectId_);
}
if (zipkinExporterEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, zipkinExporterEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zipkinUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, zipkinUrl_);
}
{
int dataSize = 0;
for (int i = 0; i < incomingTraceContext_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(incomingTraceContext_.get(i));
}
size += dataSize;
if (!getIncomingTraceContextList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}incomingTraceContextMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < outgoingTraceContext_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(outgoingTraceContext_.get(i));
}
size += dataSize;
if (!getOutgoingTraceContextList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}outgoingTraceContextMemoizedSerializedSize = dataSize;
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stackdriverAddress_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, stackdriverAddress_);
}
if (ocagentExporterEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, ocagentExporterEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ocagentAddress_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, ocagentAddress_);
}
if (stackdriverGrpcService_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, getStackdriverGrpcService());
}
if (ocagentGrpcService_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getOcagentGrpcService());
}
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.OpenCensusConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig other = (io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig) obj;
if (hasTraceConfig() != other.hasTraceConfig()) return false;
if (hasTraceConfig()) {
if (!getTraceConfig()
.equals(other.getTraceConfig())) return false;
}
if (getStdoutExporterEnabled()
!= other.getStdoutExporterEnabled()) return false;
if (getStackdriverExporterEnabled()
!= other.getStackdriverExporterEnabled()) return false;
if (!getStackdriverProjectId()
.equals(other.getStackdriverProjectId())) return false;
if (!getStackdriverAddress()
.equals(other.getStackdriverAddress())) return false;
if (hasStackdriverGrpcService() != other.hasStackdriverGrpcService()) return false;
if (hasStackdriverGrpcService()) {
if (!getStackdriverGrpcService()
.equals(other.getStackdriverGrpcService())) return false;
}
if (getZipkinExporterEnabled()
!= other.getZipkinExporterEnabled()) return false;
if (!getZipkinUrl()
.equals(other.getZipkinUrl())) return false;
if (getOcagentExporterEnabled()
!= other.getOcagentExporterEnabled()) return false;
if (!getOcagentAddress()
.equals(other.getOcagentAddress())) return false;
if (hasOcagentGrpcService() != other.hasOcagentGrpcService()) return false;
if (hasOcagentGrpcService()) {
if (!getOcagentGrpcService()
.equals(other.getOcagentGrpcService())) return false;
}
if (!incomingTraceContext_.equals(other.incomingTraceContext_)) return false;
if (!outgoingTraceContext_.equals(other.outgoingTraceContext_)) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTraceConfig()) {
hash = (37 * hash) + TRACE_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getTraceConfig().hashCode();
}
hash = (37 * hash) + STDOUT_EXPORTER_ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getStdoutExporterEnabled());
hash = (37 * hash) + STACKDRIVER_EXPORTER_ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getStackdriverExporterEnabled());
hash = (37 * hash) + STACKDRIVER_PROJECT_ID_FIELD_NUMBER;
hash = (53 * hash) + getStackdriverProjectId().hashCode();
hash = (37 * hash) + STACKDRIVER_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getStackdriverAddress().hashCode();
if (hasStackdriverGrpcService()) {
hash = (37 * hash) + STACKDRIVER_GRPC_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getStackdriverGrpcService().hashCode();
}
hash = (37 * hash) + ZIPKIN_EXPORTER_ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getZipkinExporterEnabled());
hash = (37 * hash) + ZIPKIN_URL_FIELD_NUMBER;
hash = (53 * hash) + getZipkinUrl().hashCode();
hash = (37 * hash) + OCAGENT_EXPORTER_ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getOcagentExporterEnabled());
hash = (37 * hash) + OCAGENT_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getOcagentAddress().hashCode();
if (hasOcagentGrpcService()) {
hash = (37 * hash) + OCAGENT_GRPC_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getOcagentGrpcService().hashCode();
}
if (getIncomingTraceContextCount() > 0) {
hash = (37 * hash) + INCOMING_TRACE_CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + incomingTraceContext_.hashCode();
}
if (getOutgoingTraceContextCount() > 0) {
hash = (37 * hash) + OUTGOING_TRACE_CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + outgoingTraceContext_.hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig 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.OpenCensusConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig 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.OpenCensusConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig 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.OpenCensusConfig 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.OpenCensusConfig 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.OpenCensusConfig 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.OpenCensusConfig 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.OpenCensusConfig 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.OpenCensusConfig 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.OpenCensusConfig 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 OpenCensus tracer.
* [#next-free-field: 15]
* [#extension: envoy.tracers.opencensus]
*
*
* Protobuf type {@code envoy.config.trace.v2.OpenCensusConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.config.trace.v2.OpenCensusConfig)
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.config.trace.v2.OpencensusProto.internal_static_envoy_config_trace_v2_OpenCensusConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.config.trace.v2.OpencensusProto.internal_static_envoy_config_trace_v2_OpenCensusConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.class, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.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();
if (traceConfigBuilder_ == null) {
traceConfig_ = null;
} else {
traceConfig_ = null;
traceConfigBuilder_ = null;
}
stdoutExporterEnabled_ = false;
stackdriverExporterEnabled_ = false;
stackdriverProjectId_ = "";
stackdriverAddress_ = "";
if (stackdriverGrpcServiceBuilder_ == null) {
stackdriverGrpcService_ = null;
} else {
stackdriverGrpcService_ = null;
stackdriverGrpcServiceBuilder_ = null;
}
zipkinExporterEnabled_ = false;
zipkinUrl_ = "";
ocagentExporterEnabled_ = false;
ocagentAddress_ = "";
if (ocagentGrpcServiceBuilder_ == null) {
ocagentGrpcService_ = null;
} else {
ocagentGrpcService_ = null;
ocagentGrpcServiceBuilder_ = null;
}
incomingTraceContext_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
outgoingTraceContext_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.config.trace.v2.OpencensusProto.internal_static_envoy_config_trace_v2_OpenCensusConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig build() {
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig buildPartial() {
io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig result = new io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig(this);
int from_bitField0_ = bitField0_;
if (traceConfigBuilder_ == null) {
result.traceConfig_ = traceConfig_;
} else {
result.traceConfig_ = traceConfigBuilder_.build();
}
result.stdoutExporterEnabled_ = stdoutExporterEnabled_;
result.stackdriverExporterEnabled_ = stackdriverExporterEnabled_;
result.stackdriverProjectId_ = stackdriverProjectId_;
result.stackdriverAddress_ = stackdriverAddress_;
if (stackdriverGrpcServiceBuilder_ == null) {
result.stackdriverGrpcService_ = stackdriverGrpcService_;
} else {
result.stackdriverGrpcService_ = stackdriverGrpcServiceBuilder_.build();
}
result.zipkinExporterEnabled_ = zipkinExporterEnabled_;
result.zipkinUrl_ = zipkinUrl_;
result.ocagentExporterEnabled_ = ocagentExporterEnabled_;
result.ocagentAddress_ = ocagentAddress_;
if (ocagentGrpcServiceBuilder_ == null) {
result.ocagentGrpcService_ = ocagentGrpcService_;
} else {
result.ocagentGrpcService_ = ocagentGrpcServiceBuilder_.build();
}
if (((bitField0_ & 0x00000001) != 0)) {
incomingTraceContext_ = java.util.Collections.unmodifiableList(incomingTraceContext_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.incomingTraceContext_ = incomingTraceContext_;
if (((bitField0_ & 0x00000002) != 0)) {
outgoingTraceContext_ = java.util.Collections.unmodifiableList(outgoingTraceContext_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.outgoingTraceContext_ = outgoingTraceContext_;
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.OpenCensusConfig) {
return mergeFrom((io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig other) {
if (other == io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.getDefaultInstance()) return this;
if (other.hasTraceConfig()) {
mergeTraceConfig(other.getTraceConfig());
}
if (other.getStdoutExporterEnabled() != false) {
setStdoutExporterEnabled(other.getStdoutExporterEnabled());
}
if (other.getStackdriverExporterEnabled() != false) {
setStackdriverExporterEnabled(other.getStackdriverExporterEnabled());
}
if (!other.getStackdriverProjectId().isEmpty()) {
stackdriverProjectId_ = other.stackdriverProjectId_;
onChanged();
}
if (!other.getStackdriverAddress().isEmpty()) {
stackdriverAddress_ = other.stackdriverAddress_;
onChanged();
}
if (other.hasStackdriverGrpcService()) {
mergeStackdriverGrpcService(other.getStackdriverGrpcService());
}
if (other.getZipkinExporterEnabled() != false) {
setZipkinExporterEnabled(other.getZipkinExporterEnabled());
}
if (!other.getZipkinUrl().isEmpty()) {
zipkinUrl_ = other.zipkinUrl_;
onChanged();
}
if (other.getOcagentExporterEnabled() != false) {
setOcagentExporterEnabled(other.getOcagentExporterEnabled());
}
if (!other.getOcagentAddress().isEmpty()) {
ocagentAddress_ = other.ocagentAddress_;
onChanged();
}
if (other.hasOcagentGrpcService()) {
mergeOcagentGrpcService(other.getOcagentGrpcService());
}
if (!other.incomingTraceContext_.isEmpty()) {
if (incomingTraceContext_.isEmpty()) {
incomingTraceContext_ = other.incomingTraceContext_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureIncomingTraceContextIsMutable();
incomingTraceContext_.addAll(other.incomingTraceContext_);
}
onChanged();
}
if (!other.outgoingTraceContext_.isEmpty()) {
if (outgoingTraceContext_.isEmpty()) {
outgoingTraceContext_ = other.outgoingTraceContext_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureOutgoingTraceContextIsMutable();
outgoingTraceContext_.addAll(other.outgoingTraceContext_);
}
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.OpenCensusConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private io.opencensus.proto.trace.v1.TraceConfig traceConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.trace.v1.TraceConfig, io.opencensus.proto.trace.v1.TraceConfig.Builder, io.opencensus.proto.trace.v1.TraceConfigOrBuilder> traceConfigBuilder_;
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
* @return Whether the traceConfig field is set.
*/
public boolean hasTraceConfig() {
return traceConfigBuilder_ != null || traceConfig_ != null;
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
* @return The traceConfig.
*/
public io.opencensus.proto.trace.v1.TraceConfig getTraceConfig() {
if (traceConfigBuilder_ == null) {
return traceConfig_ == null ? io.opencensus.proto.trace.v1.TraceConfig.getDefaultInstance() : traceConfig_;
} else {
return traceConfigBuilder_.getMessage();
}
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
public Builder setTraceConfig(io.opencensus.proto.trace.v1.TraceConfig value) {
if (traceConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
traceConfig_ = value;
onChanged();
} else {
traceConfigBuilder_.setMessage(value);
}
return this;
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
public Builder setTraceConfig(
io.opencensus.proto.trace.v1.TraceConfig.Builder builderForValue) {
if (traceConfigBuilder_ == null) {
traceConfig_ = builderForValue.build();
onChanged();
} else {
traceConfigBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
public Builder mergeTraceConfig(io.opencensus.proto.trace.v1.TraceConfig value) {
if (traceConfigBuilder_ == null) {
if (traceConfig_ != null) {
traceConfig_ =
io.opencensus.proto.trace.v1.TraceConfig.newBuilder(traceConfig_).mergeFrom(value).buildPartial();
} else {
traceConfig_ = value;
}
onChanged();
} else {
traceConfigBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
public Builder clearTraceConfig() {
if (traceConfigBuilder_ == null) {
traceConfig_ = null;
onChanged();
} else {
traceConfig_ = null;
traceConfigBuilder_ = null;
}
return this;
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
public io.opencensus.proto.trace.v1.TraceConfig.Builder getTraceConfigBuilder() {
onChanged();
return getTraceConfigFieldBuilder().getBuilder();
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
public io.opencensus.proto.trace.v1.TraceConfigOrBuilder getTraceConfigOrBuilder() {
if (traceConfigBuilder_ != null) {
return traceConfigBuilder_.getMessageOrBuilder();
} else {
return traceConfig_ == null ?
io.opencensus.proto.trace.v1.TraceConfig.getDefaultInstance() : traceConfig_;
}
}
/**
*
* Configures tracing, e.g. the sampler, max number of annotations, etc.
*
*
* .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.trace.v1.TraceConfig, io.opencensus.proto.trace.v1.TraceConfig.Builder, io.opencensus.proto.trace.v1.TraceConfigOrBuilder>
getTraceConfigFieldBuilder() {
if (traceConfigBuilder_ == null) {
traceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.opencensus.proto.trace.v1.TraceConfig, io.opencensus.proto.trace.v1.TraceConfig.Builder, io.opencensus.proto.trace.v1.TraceConfigOrBuilder>(
getTraceConfig(),
getParentForChildren(),
isClean());
traceConfig_ = null;
}
return traceConfigBuilder_;
}
private boolean stdoutExporterEnabled_ ;
/**
*
* Enables the stdout exporter if set to true. This is intended for debugging
* purposes.
*
*
* bool stdout_exporter_enabled = 2;
* @return The stdoutExporterEnabled.
*/
@java.lang.Override
public boolean getStdoutExporterEnabled() {
return stdoutExporterEnabled_;
}
/**
*
* Enables the stdout exporter if set to true. This is intended for debugging
* purposes.
*
*
* bool stdout_exporter_enabled = 2;
* @param value The stdoutExporterEnabled to set.
* @return This builder for chaining.
*/
public Builder setStdoutExporterEnabled(boolean value) {
stdoutExporterEnabled_ = value;
onChanged();
return this;
}
/**
*
* Enables the stdout exporter if set to true. This is intended for debugging
* purposes.
*
*
* bool stdout_exporter_enabled = 2;
* @return This builder for chaining.
*/
public Builder clearStdoutExporterEnabled() {
stdoutExporterEnabled_ = false;
onChanged();
return this;
}
private boolean stackdriverExporterEnabled_ ;
/**
*
* Enables the Stackdriver exporter if set to true. The project_id must also
* be set.
*
*
* bool stackdriver_exporter_enabled = 3;
* @return The stackdriverExporterEnabled.
*/
@java.lang.Override
public boolean getStackdriverExporterEnabled() {
return stackdriverExporterEnabled_;
}
/**
*
* Enables the Stackdriver exporter if set to true. The project_id must also
* be set.
*
*
* bool stackdriver_exporter_enabled = 3;
* @param value The stackdriverExporterEnabled to set.
* @return This builder for chaining.
*/
public Builder setStackdriverExporterEnabled(boolean value) {
stackdriverExporterEnabled_ = value;
onChanged();
return this;
}
/**
*
* Enables the Stackdriver exporter if set to true. The project_id must also
* be set.
*
*
* bool stackdriver_exporter_enabled = 3;
* @return This builder for chaining.
*/
public Builder clearStackdriverExporterEnabled() {
stackdriverExporterEnabled_ = false;
onChanged();
return this;
}
private java.lang.Object stackdriverProjectId_ = "";
/**
*
* The Cloud project_id to use for Stackdriver tracing.
*
*
* string stackdriver_project_id = 4;
* @return The stackdriverProjectId.
*/
public java.lang.String getStackdriverProjectId() {
java.lang.Object ref = stackdriverProjectId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
stackdriverProjectId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The Cloud project_id to use for Stackdriver tracing.
*
*
* string stackdriver_project_id = 4;
* @return The bytes for stackdriverProjectId.
*/
public com.google.protobuf.ByteString
getStackdriverProjectIdBytes() {
java.lang.Object ref = stackdriverProjectId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stackdriverProjectId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The Cloud project_id to use for Stackdriver tracing.
*
*
* string stackdriver_project_id = 4;
* @param value The stackdriverProjectId to set.
* @return This builder for chaining.
*/
public Builder setStackdriverProjectId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
stackdriverProjectId_ = value;
onChanged();
return this;
}
/**
*
* The Cloud project_id to use for Stackdriver tracing.
*
*
* string stackdriver_project_id = 4;
* @return This builder for chaining.
*/
public Builder clearStackdriverProjectId() {
stackdriverProjectId_ = getDefaultInstance().getStackdriverProjectId();
onChanged();
return this;
}
/**
*
* The Cloud project_id to use for Stackdriver tracing.
*
*
* string stackdriver_project_id = 4;
* @param value The bytes for stackdriverProjectId to set.
* @return This builder for chaining.
*/
public Builder setStackdriverProjectIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
stackdriverProjectId_ = value;
onChanged();
return this;
}
private java.lang.Object stackdriverAddress_ = "";
/**
*
* (optional) By default, the Stackdriver exporter will connect to production
* Stackdriver. If stackdriver_address is non-empty, it will instead connect
* to this address, which is in the gRPC format:
* https://github.com/grpc/grpc/blob/master/doc/naming.md
*
*
* string stackdriver_address = 10;
* @return The stackdriverAddress.
*/
public java.lang.String getStackdriverAddress() {
java.lang.Object ref = stackdriverAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
stackdriverAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* (optional) By default, the Stackdriver exporter will connect to production
* Stackdriver. If stackdriver_address is non-empty, it will instead connect
* to this address, which is in the gRPC format:
* https://github.com/grpc/grpc/blob/master/doc/naming.md
*
*
* string stackdriver_address = 10;
* @return The bytes for stackdriverAddress.
*/
public com.google.protobuf.ByteString
getStackdriverAddressBytes() {
java.lang.Object ref = stackdriverAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
stackdriverAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* (optional) By default, the Stackdriver exporter will connect to production
* Stackdriver. If stackdriver_address is non-empty, it will instead connect
* to this address, which is in the gRPC format:
* https://github.com/grpc/grpc/blob/master/doc/naming.md
*
*
* string stackdriver_address = 10;
* @param value The stackdriverAddress to set.
* @return This builder for chaining.
*/
public Builder setStackdriverAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
stackdriverAddress_ = value;
onChanged();
return this;
}
/**
*
* (optional) By default, the Stackdriver exporter will connect to production
* Stackdriver. If stackdriver_address is non-empty, it will instead connect
* to this address, which is in the gRPC format:
* https://github.com/grpc/grpc/blob/master/doc/naming.md
*
*
* string stackdriver_address = 10;
* @return This builder for chaining.
*/
public Builder clearStackdriverAddress() {
stackdriverAddress_ = getDefaultInstance().getStackdriverAddress();
onChanged();
return this;
}
/**
*
* (optional) By default, the Stackdriver exporter will connect to production
* Stackdriver. If stackdriver_address is non-empty, it will instead connect
* to this address, which is in the gRPC format:
* https://github.com/grpc/grpc/blob/master/doc/naming.md
*
*
* string stackdriver_address = 10;
* @param value The bytes for stackdriverAddress to set.
* @return This builder for chaining.
*/
public Builder setStackdriverAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
stackdriverAddress_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.api.v2.core.GrpcService stackdriverGrpcService_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.GrpcService, io.envoyproxy.envoy.api.v2.core.GrpcService.Builder, io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder> stackdriverGrpcServiceBuilder_;
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
* @return Whether the stackdriverGrpcService field is set.
*/
public boolean hasStackdriverGrpcService() {
return stackdriverGrpcServiceBuilder_ != null || stackdriverGrpcService_ != null;
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
* @return The stackdriverGrpcService.
*/
public io.envoyproxy.envoy.api.v2.core.GrpcService getStackdriverGrpcService() {
if (stackdriverGrpcServiceBuilder_ == null) {
return stackdriverGrpcService_ == null ? io.envoyproxy.envoy.api.v2.core.GrpcService.getDefaultInstance() : stackdriverGrpcService_;
} else {
return stackdriverGrpcServiceBuilder_.getMessage();
}
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
public Builder setStackdriverGrpcService(io.envoyproxy.envoy.api.v2.core.GrpcService value) {
if (stackdriverGrpcServiceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
stackdriverGrpcService_ = value;
onChanged();
} else {
stackdriverGrpcServiceBuilder_.setMessage(value);
}
return this;
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
public Builder setStackdriverGrpcService(
io.envoyproxy.envoy.api.v2.core.GrpcService.Builder builderForValue) {
if (stackdriverGrpcServiceBuilder_ == null) {
stackdriverGrpcService_ = builderForValue.build();
onChanged();
} else {
stackdriverGrpcServiceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
public Builder mergeStackdriverGrpcService(io.envoyproxy.envoy.api.v2.core.GrpcService value) {
if (stackdriverGrpcServiceBuilder_ == null) {
if (stackdriverGrpcService_ != null) {
stackdriverGrpcService_ =
io.envoyproxy.envoy.api.v2.core.GrpcService.newBuilder(stackdriverGrpcService_).mergeFrom(value).buildPartial();
} else {
stackdriverGrpcService_ = value;
}
onChanged();
} else {
stackdriverGrpcServiceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
public Builder clearStackdriverGrpcService() {
if (stackdriverGrpcServiceBuilder_ == null) {
stackdriverGrpcService_ = null;
onChanged();
} else {
stackdriverGrpcService_ = null;
stackdriverGrpcServiceBuilder_ = null;
}
return this;
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
public io.envoyproxy.envoy.api.v2.core.GrpcService.Builder getStackdriverGrpcServiceBuilder() {
onChanged();
return getStackdriverGrpcServiceFieldBuilder().getBuilder();
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
public io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder getStackdriverGrpcServiceOrBuilder() {
if (stackdriverGrpcServiceBuilder_ != null) {
return stackdriverGrpcServiceBuilder_.getMessageOrBuilder();
} else {
return stackdriverGrpcService_ == null ?
io.envoyproxy.envoy.api.v2.core.GrpcService.getDefaultInstance() : stackdriverGrpcService_;
}
}
/**
*
* (optional) The gRPC server that hosts Stackdriver tracing service. Only
* Google gRPC is supported. If :ref:`target_uri <envoy_v3_api_field_config.core.v3.GrpcService.GoogleGrpc.target_uri>`
* is not provided, the default production Stackdriver address will be used.
*
*
* .envoy.api.v2.core.GrpcService stackdriver_grpc_service = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.GrpcService, io.envoyproxy.envoy.api.v2.core.GrpcService.Builder, io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder>
getStackdriverGrpcServiceFieldBuilder() {
if (stackdriverGrpcServiceBuilder_ == null) {
stackdriverGrpcServiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.GrpcService, io.envoyproxy.envoy.api.v2.core.GrpcService.Builder, io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder>(
getStackdriverGrpcService(),
getParentForChildren(),
isClean());
stackdriverGrpcService_ = null;
}
return stackdriverGrpcServiceBuilder_;
}
private boolean zipkinExporterEnabled_ ;
/**
*
* Enables the Zipkin exporter if set to true. The url and service name must
* also be set.
*
*
* bool zipkin_exporter_enabled = 5;
* @return The zipkinExporterEnabled.
*/
@java.lang.Override
public boolean getZipkinExporterEnabled() {
return zipkinExporterEnabled_;
}
/**
*
* Enables the Zipkin exporter if set to true. The url and service name must
* also be set.
*
*
* bool zipkin_exporter_enabled = 5;
* @param value The zipkinExporterEnabled to set.
* @return This builder for chaining.
*/
public Builder setZipkinExporterEnabled(boolean value) {
zipkinExporterEnabled_ = value;
onChanged();
return this;
}
/**
*
* Enables the Zipkin exporter if set to true. The url and service name must
* also be set.
*
*
* bool zipkin_exporter_enabled = 5;
* @return This builder for chaining.
*/
public Builder clearZipkinExporterEnabled() {
zipkinExporterEnabled_ = false;
onChanged();
return this;
}
private java.lang.Object zipkinUrl_ = "";
/**
*
* The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
*
*
* string zipkin_url = 6;
* @return The zipkinUrl.
*/
public java.lang.String getZipkinUrl() {
java.lang.Object ref = zipkinUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zipkinUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
*
*
* string zipkin_url = 6;
* @return The bytes for zipkinUrl.
*/
public com.google.protobuf.ByteString
getZipkinUrlBytes() {
java.lang.Object ref = zipkinUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zipkinUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
*
*
* string zipkin_url = 6;
* @param value The zipkinUrl to set.
* @return This builder for chaining.
*/
public Builder setZipkinUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
zipkinUrl_ = value;
onChanged();
return this;
}
/**
*
* The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
*
*
* string zipkin_url = 6;
* @return This builder for chaining.
*/
public Builder clearZipkinUrl() {
zipkinUrl_ = getDefaultInstance().getZipkinUrl();
onChanged();
return this;
}
/**
*
* The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
*
*
* string zipkin_url = 6;
* @param value The bytes for zipkinUrl to set.
* @return This builder for chaining.
*/
public Builder setZipkinUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
zipkinUrl_ = value;
onChanged();
return this;
}
private boolean ocagentExporterEnabled_ ;
/**
*
* Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
* ocagent_grpc_service must also be set.
*
*
* bool ocagent_exporter_enabled = 11;
* @return The ocagentExporterEnabled.
*/
@java.lang.Override
public boolean getOcagentExporterEnabled() {
return ocagentExporterEnabled_;
}
/**
*
* Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
* ocagent_grpc_service must also be set.
*
*
* bool ocagent_exporter_enabled = 11;
* @param value The ocagentExporterEnabled to set.
* @return This builder for chaining.
*/
public Builder setOcagentExporterEnabled(boolean value) {
ocagentExporterEnabled_ = value;
onChanged();
return this;
}
/**
*
* Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
* ocagent_grpc_service must also be set.
*
*
* bool ocagent_exporter_enabled = 11;
* @return This builder for chaining.
*/
public Builder clearOcagentExporterEnabled() {
ocagentExporterEnabled_ = false;
onChanged();
return this;
}
private java.lang.Object ocagentAddress_ = "";
/**
*
* The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
* format: https://github.com/grpc/grpc/blob/master/doc/naming.md
* [#comment:TODO: deprecate this field]
*
*
* string ocagent_address = 12;
* @return The ocagentAddress.
*/
public java.lang.String getOcagentAddress() {
java.lang.Object ref = ocagentAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ocagentAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
* format: https://github.com/grpc/grpc/blob/master/doc/naming.md
* [#comment:TODO: deprecate this field]
*
*
* string ocagent_address = 12;
* @return The bytes for ocagentAddress.
*/
public com.google.protobuf.ByteString
getOcagentAddressBytes() {
java.lang.Object ref = ocagentAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ocagentAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
* format: https://github.com/grpc/grpc/blob/master/doc/naming.md
* [#comment:TODO: deprecate this field]
*
*
* string ocagent_address = 12;
* @param value The ocagentAddress to set.
* @return This builder for chaining.
*/
public Builder setOcagentAddress(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ocagentAddress_ = value;
onChanged();
return this;
}
/**
*
* The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
* format: https://github.com/grpc/grpc/blob/master/doc/naming.md
* [#comment:TODO: deprecate this field]
*
*
* string ocagent_address = 12;
* @return This builder for chaining.
*/
public Builder clearOcagentAddress() {
ocagentAddress_ = getDefaultInstance().getOcagentAddress();
onChanged();
return this;
}
/**
*
* The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
* format: https://github.com/grpc/grpc/blob/master/doc/naming.md
* [#comment:TODO: deprecate this field]
*
*
* string ocagent_address = 12;
* @param value The bytes for ocagentAddress to set.
* @return This builder for chaining.
*/
public Builder setOcagentAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ocagentAddress_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.api.v2.core.GrpcService ocagentGrpcService_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.GrpcService, io.envoyproxy.envoy.api.v2.core.GrpcService.Builder, io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder> ocagentGrpcServiceBuilder_;
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
* @return Whether the ocagentGrpcService field is set.
*/
public boolean hasOcagentGrpcService() {
return ocagentGrpcServiceBuilder_ != null || ocagentGrpcService_ != null;
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
* @return The ocagentGrpcService.
*/
public io.envoyproxy.envoy.api.v2.core.GrpcService getOcagentGrpcService() {
if (ocagentGrpcServiceBuilder_ == null) {
return ocagentGrpcService_ == null ? io.envoyproxy.envoy.api.v2.core.GrpcService.getDefaultInstance() : ocagentGrpcService_;
} else {
return ocagentGrpcServiceBuilder_.getMessage();
}
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
public Builder setOcagentGrpcService(io.envoyproxy.envoy.api.v2.core.GrpcService value) {
if (ocagentGrpcServiceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ocagentGrpcService_ = value;
onChanged();
} else {
ocagentGrpcServiceBuilder_.setMessage(value);
}
return this;
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
public Builder setOcagentGrpcService(
io.envoyproxy.envoy.api.v2.core.GrpcService.Builder builderForValue) {
if (ocagentGrpcServiceBuilder_ == null) {
ocagentGrpcService_ = builderForValue.build();
onChanged();
} else {
ocagentGrpcServiceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
public Builder mergeOcagentGrpcService(io.envoyproxy.envoy.api.v2.core.GrpcService value) {
if (ocagentGrpcServiceBuilder_ == null) {
if (ocagentGrpcService_ != null) {
ocagentGrpcService_ =
io.envoyproxy.envoy.api.v2.core.GrpcService.newBuilder(ocagentGrpcService_).mergeFrom(value).buildPartial();
} else {
ocagentGrpcService_ = value;
}
onChanged();
} else {
ocagentGrpcServiceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
public Builder clearOcagentGrpcService() {
if (ocagentGrpcServiceBuilder_ == null) {
ocagentGrpcService_ = null;
onChanged();
} else {
ocagentGrpcService_ = null;
ocagentGrpcServiceBuilder_ = null;
}
return this;
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
public io.envoyproxy.envoy.api.v2.core.GrpcService.Builder getOcagentGrpcServiceBuilder() {
onChanged();
return getOcagentGrpcServiceFieldBuilder().getBuilder();
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
public io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder getOcagentGrpcServiceOrBuilder() {
if (ocagentGrpcServiceBuilder_ != null) {
return ocagentGrpcServiceBuilder_.getMessageOrBuilder();
} else {
return ocagentGrpcService_ == null ?
io.envoyproxy.envoy.api.v2.core.GrpcService.getDefaultInstance() : ocagentGrpcService_;
}
}
/**
*
* (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
* This is only used if the ocagent_address is left empty.
*
*
* .envoy.api.v2.core.GrpcService ocagent_grpc_service = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.GrpcService, io.envoyproxy.envoy.api.v2.core.GrpcService.Builder, io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder>
getOcagentGrpcServiceFieldBuilder() {
if (ocagentGrpcServiceBuilder_ == null) {
ocagentGrpcServiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.core.GrpcService, io.envoyproxy.envoy.api.v2.core.GrpcService.Builder, io.envoyproxy.envoy.api.v2.core.GrpcServiceOrBuilder>(
getOcagentGrpcService(),
getParentForChildren(),
isClean());
ocagentGrpcService_ = null;
}
return ocagentGrpcServiceBuilder_;
}
private java.util.List incomingTraceContext_ =
java.util.Collections.emptyList();
private void ensureIncomingTraceContextIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
incomingTraceContext_ = new java.util.ArrayList(incomingTraceContext_);
bitField0_ |= 0x00000001;
}
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @return A list containing the incomingTraceContext.
*/
public java.util.List getIncomingTraceContextList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext>(incomingTraceContext_, incomingTraceContext_converter_);
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @return The count of incomingTraceContext.
*/
public int getIncomingTraceContextCount() {
return incomingTraceContext_.size();
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param index The index of the element to return.
* @return The incomingTraceContext at the given index.
*/
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext getIncomingTraceContext(int index) {
return incomingTraceContext_converter_.convert(incomingTraceContext_.get(index));
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param index The index to set the value at.
* @param value The incomingTraceContext to set.
* @return This builder for chaining.
*/
public Builder setIncomingTraceContext(
int index, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncomingTraceContextIsMutable();
incomingTraceContext_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param value The incomingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addIncomingTraceContext(io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext value) {
if (value == null) {
throw new NullPointerException();
}
ensureIncomingTraceContextIsMutable();
incomingTraceContext_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param values The incomingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addAllIncomingTraceContext(
java.lang.Iterable extends io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext> values) {
ensureIncomingTraceContextIsMutable();
for (io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext value : values) {
incomingTraceContext_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @return This builder for chaining.
*/
public Builder clearIncomingTraceContext() {
incomingTraceContext_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @return A list containing the enum numeric values on the wire for incomingTraceContext.
*/
public java.util.List
getIncomingTraceContextValueList() {
return java.util.Collections.unmodifiableList(incomingTraceContext_);
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of incomingTraceContext at the given index.
*/
public int getIncomingTraceContextValue(int index) {
return incomingTraceContext_.get(index);
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of incomingTraceContext at the given index.
* @return This builder for chaining.
*/
public Builder setIncomingTraceContextValue(
int index, int value) {
ensureIncomingTraceContextIsMutable();
incomingTraceContext_.set(index, value);
onChanged();
return this;
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param value The enum numeric value on the wire for incomingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addIncomingTraceContextValue(int value) {
ensureIncomingTraceContextIsMutable();
incomingTraceContext_.add(value);
onChanged();
return this;
}
/**
*
* List of incoming trace context headers we will accept. First one found
* wins.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext incoming_trace_context = 8;
* @param values The enum numeric values on the wire for incomingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addAllIncomingTraceContextValue(
java.lang.Iterable values) {
ensureIncomingTraceContextIsMutable();
for (int value : values) {
incomingTraceContext_.add(value);
}
onChanged();
return this;
}
private java.util.List outgoingTraceContext_ =
java.util.Collections.emptyList();
private void ensureOutgoingTraceContextIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
outgoingTraceContext_ = new java.util.ArrayList(outgoingTraceContext_);
bitField0_ |= 0x00000002;
}
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @return A list containing the outgoingTraceContext.
*/
public java.util.List getOutgoingTraceContextList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext>(outgoingTraceContext_, outgoingTraceContext_converter_);
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @return The count of outgoingTraceContext.
*/
public int getOutgoingTraceContextCount() {
return outgoingTraceContext_.size();
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param index The index of the element to return.
* @return The outgoingTraceContext at the given index.
*/
public io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext getOutgoingTraceContext(int index) {
return outgoingTraceContext_converter_.convert(outgoingTraceContext_.get(index));
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param index The index to set the value at.
* @param value The outgoingTraceContext to set.
* @return This builder for chaining.
*/
public Builder setOutgoingTraceContext(
int index, io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext value) {
if (value == null) {
throw new NullPointerException();
}
ensureOutgoingTraceContextIsMutable();
outgoingTraceContext_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param value The outgoingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addOutgoingTraceContext(io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext value) {
if (value == null) {
throw new NullPointerException();
}
ensureOutgoingTraceContextIsMutable();
outgoingTraceContext_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param values The outgoingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addAllOutgoingTraceContext(
java.lang.Iterable extends io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext> values) {
ensureOutgoingTraceContextIsMutable();
for (io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig.TraceContext value : values) {
outgoingTraceContext_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @return This builder for chaining.
*/
public Builder clearOutgoingTraceContext() {
outgoingTraceContext_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @return A list containing the enum numeric values on the wire for outgoingTraceContext.
*/
public java.util.List
getOutgoingTraceContextValueList() {
return java.util.Collections.unmodifiableList(outgoingTraceContext_);
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of outgoingTraceContext at the given index.
*/
public int getOutgoingTraceContextValue(int index) {
return outgoingTraceContext_.get(index);
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of outgoingTraceContext at the given index.
* @return This builder for chaining.
*/
public Builder setOutgoingTraceContextValue(
int index, int value) {
ensureOutgoingTraceContextIsMutable();
outgoingTraceContext_.set(index, value);
onChanged();
return this;
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param value The enum numeric value on the wire for outgoingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addOutgoingTraceContextValue(int value) {
ensureOutgoingTraceContextIsMutable();
outgoingTraceContext_.add(value);
onChanged();
return this;
}
/**
*
* List of outgoing trace context headers we will produce.
*
*
* repeated .envoy.config.trace.v2.OpenCensusConfig.TraceContext outgoing_trace_context = 9;
* @param values The enum numeric values on the wire for outgoingTraceContext to add.
* @return This builder for chaining.
*/
public Builder addAllOutgoingTraceContextValue(
java.lang.Iterable values) {
ensureOutgoingTraceContextIsMutable();
for (int value : values) {
outgoingTraceContext_.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.OpenCensusConfig)
}
// @@protoc_insertion_point(class_scope:envoy.config.trace.v2.OpenCensusConfig)
private static final io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig();
}
public static io.envoyproxy.envoy.config.trace.v2.OpenCensusConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OpenCensusConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OpenCensusConfig(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.OpenCensusConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}