io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/extensions/request_id/uuid/v3/uuid.proto
package io.envoyproxy.envoy.extensions.request_id.uuid.v3;
/**
*
* Configuration for the default UUID request ID extension which has the following behavior:
* 1. Request ID is propagated using the :ref:`x-request-id
* <config_http_conn_man_headers_x-request-id>` header.
* 2. Request ID is a universally unique identifier `(UUID4)
* <https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)>`_.
* 3. Tracing decision (sampled, forced, etc) is set in 14th nibble of the UUID. By default this will
* overwrite existing UUIDs received in the ``x-request-id`` header if the trace sampling decision
* is changed. The 14th nibble of the UUID4 has been chosen because it is fixed to '4' by the
* standard. Thus, '4' indicates a default UUID and no trace status. This nibble is swapped to:
* a. '9': Sampled.
* b. 'a': Force traced due to server-side override.
* c. 'b': Force traced due to client-side request ID joining.
* See the :ref:`x-request-id <config_http_conn_man_headers_x-request-id>` documentation for
* more information.
*
*
* Protobuf type {@code envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig}
*/
public final class UuidRequestIdConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig)
UuidRequestIdConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use UuidRequestIdConfig.newBuilder() to construct.
private UuidRequestIdConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UuidRequestIdConfig() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UuidRequestIdConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UuidRequestIdConfig(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (packTraceReason_ != null) {
subBuilder = packTraceReason_.toBuilder();
}
packTraceReason_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(packTraceReason_);
packTraceReason_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.google.protobuf.BoolValue.Builder subBuilder = null;
if (useRequestIdForTraceSampling_ != null) {
subBuilder = useRequestIdForTraceSampling_.toBuilder();
}
useRequestIdForTraceSampling_ = input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(useRequestIdForTraceSampling_);
useRequestIdForTraceSampling_ = 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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidProto.internal_static_envoy_extensions_request_id_uuid_v3_UuidRequestIdConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidProto.internal_static_envoy_extensions_request_id_uuid_v3_UuidRequestIdConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.class, io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.Builder.class);
}
public static final int PACK_TRACE_REASON_FIELD_NUMBER = 1;
private com.google.protobuf.BoolValue packTraceReason_;
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
* @return Whether the packTraceReason field is set.
*/
@java.lang.Override
public boolean hasPackTraceReason() {
return packTraceReason_ != null;
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
* @return The packTraceReason.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getPackTraceReason() {
return packTraceReason_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : packTraceReason_;
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getPackTraceReasonOrBuilder() {
return getPackTraceReason();
}
public static final int USE_REQUEST_ID_FOR_TRACE_SAMPLING_FIELD_NUMBER = 2;
private com.google.protobuf.BoolValue useRequestIdForTraceSampling_;
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
* @return Whether the useRequestIdForTraceSampling field is set.
*/
@java.lang.Override
public boolean hasUseRequestIdForTraceSampling() {
return useRequestIdForTraceSampling_ != null;
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
* @return The useRequestIdForTraceSampling.
*/
@java.lang.Override
public com.google.protobuf.BoolValue getUseRequestIdForTraceSampling() {
return useRequestIdForTraceSampling_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : useRequestIdForTraceSampling_;
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
@java.lang.Override
public com.google.protobuf.BoolValueOrBuilder getUseRequestIdForTraceSamplingOrBuilder() {
return getUseRequestIdForTraceSampling();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (packTraceReason_ != null) {
output.writeMessage(1, getPackTraceReason());
}
if (useRequestIdForTraceSampling_ != null) {
output.writeMessage(2, getUseRequestIdForTraceSampling());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (packTraceReason_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getPackTraceReason());
}
if (useRequestIdForTraceSampling_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getUseRequestIdForTraceSampling());
}
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.extensions.request_id.uuid.v3.UuidRequestIdConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig other = (io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig) obj;
if (hasPackTraceReason() != other.hasPackTraceReason()) return false;
if (hasPackTraceReason()) {
if (!getPackTraceReason()
.equals(other.getPackTraceReason())) return false;
}
if (hasUseRequestIdForTraceSampling() != other.hasUseRequestIdForTraceSampling()) return false;
if (hasUseRequestIdForTraceSampling()) {
if (!getUseRequestIdForTraceSampling()
.equals(other.getUseRequestIdForTraceSampling())) 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 (hasPackTraceReason()) {
hash = (37 * hash) + PACK_TRACE_REASON_FIELD_NUMBER;
hash = (53 * hash) + getPackTraceReason().hashCode();
}
if (hasUseRequestIdForTraceSampling()) {
hash = (37 * hash) + USE_REQUEST_ID_FOR_TRACE_SAMPLING_FIELD_NUMBER;
hash = (53 * hash) + getUseRequestIdForTraceSampling().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig 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.extensions.request_id.uuid.v3.UuidRequestIdConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig 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.extensions.request_id.uuid.v3.UuidRequestIdConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig 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.extensions.request_id.uuid.v3.UuidRequestIdConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig 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.extensions.request_id.uuid.v3.UuidRequestIdConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig 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.extensions.request_id.uuid.v3.UuidRequestIdConfig 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 default UUID request ID extension which has the following behavior:
* 1. Request ID is propagated using the :ref:`x-request-id
* <config_http_conn_man_headers_x-request-id>` header.
* 2. Request ID is a universally unique identifier `(UUID4)
* <https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)>`_.
* 3. Tracing decision (sampled, forced, etc) is set in 14th nibble of the UUID. By default this will
* overwrite existing UUIDs received in the ``x-request-id`` header if the trace sampling decision
* is changed. The 14th nibble of the UUID4 has been chosen because it is fixed to '4' by the
* standard. Thus, '4' indicates a default UUID and no trace status. This nibble is swapped to:
* a. '9': Sampled.
* b. 'a': Force traced due to server-side override.
* c. 'b': Force traced due to client-side request ID joining.
* See the :ref:`x-request-id <config_http_conn_man_headers_x-request-id>` documentation for
* more information.
*
*
* Protobuf type {@code envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig)
io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidProto.internal_static_envoy_extensions_request_id_uuid_v3_UuidRequestIdConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidProto.internal_static_envoy_extensions_request_id_uuid_v3_UuidRequestIdConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.class, io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.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 (packTraceReasonBuilder_ == null) {
packTraceReason_ = null;
} else {
packTraceReason_ = null;
packTraceReasonBuilder_ = null;
}
if (useRequestIdForTraceSamplingBuilder_ == null) {
useRequestIdForTraceSampling_ = null;
} else {
useRequestIdForTraceSampling_ = null;
useRequestIdForTraceSamplingBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidProto.internal_static_envoy_extensions_request_id_uuid_v3_UuidRequestIdConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig build() {
io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig buildPartial() {
io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig result = new io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig(this);
if (packTraceReasonBuilder_ == null) {
result.packTraceReason_ = packTraceReason_;
} else {
result.packTraceReason_ = packTraceReasonBuilder_.build();
}
if (useRequestIdForTraceSamplingBuilder_ == null) {
result.useRequestIdForTraceSampling_ = useRequestIdForTraceSampling_;
} else {
result.useRequestIdForTraceSampling_ = useRequestIdForTraceSamplingBuilder_.build();
}
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.extensions.request_id.uuid.v3.UuidRequestIdConfig) {
return mergeFrom((io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig other) {
if (other == io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig.getDefaultInstance()) return this;
if (other.hasPackTraceReason()) {
mergePackTraceReason(other.getPackTraceReason());
}
if (other.hasUseRequestIdForTraceSampling()) {
mergeUseRequestIdForTraceSampling(other.getUseRequestIdForTraceSampling());
}
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.extensions.request_id.uuid.v3.UuidRequestIdConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.BoolValue packTraceReason_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> packTraceReasonBuilder_;
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
* @return Whether the packTraceReason field is set.
*/
public boolean hasPackTraceReason() {
return packTraceReasonBuilder_ != null || packTraceReason_ != null;
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
* @return The packTraceReason.
*/
public com.google.protobuf.BoolValue getPackTraceReason() {
if (packTraceReasonBuilder_ == null) {
return packTraceReason_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : packTraceReason_;
} else {
return packTraceReasonBuilder_.getMessage();
}
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
public Builder setPackTraceReason(com.google.protobuf.BoolValue value) {
if (packTraceReasonBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
packTraceReason_ = value;
onChanged();
} else {
packTraceReasonBuilder_.setMessage(value);
}
return this;
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
public Builder setPackTraceReason(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (packTraceReasonBuilder_ == null) {
packTraceReason_ = builderForValue.build();
onChanged();
} else {
packTraceReasonBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
public Builder mergePackTraceReason(com.google.protobuf.BoolValue value) {
if (packTraceReasonBuilder_ == null) {
if (packTraceReason_ != null) {
packTraceReason_ =
com.google.protobuf.BoolValue.newBuilder(packTraceReason_).mergeFrom(value).buildPartial();
} else {
packTraceReason_ = value;
}
onChanged();
} else {
packTraceReasonBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
public Builder clearPackTraceReason() {
if (packTraceReasonBuilder_ == null) {
packTraceReason_ = null;
onChanged();
} else {
packTraceReason_ = null;
packTraceReasonBuilder_ = null;
}
return this;
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
public com.google.protobuf.BoolValue.Builder getPackTraceReasonBuilder() {
onChanged();
return getPackTraceReasonFieldBuilder().getBuilder();
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
public com.google.protobuf.BoolValueOrBuilder getPackTraceReasonOrBuilder() {
if (packTraceReasonBuilder_ != null) {
return packTraceReasonBuilder_.getMessageOrBuilder();
} else {
return packTraceReason_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : packTraceReason_;
}
}
/**
*
* Whether the implementation alters the UUID to contain the trace sampling decision as per the
* ``UuidRequestIdConfig`` message documentation. This defaults to true. If disabled no
* modification to the UUID will be performed. It is important to note that if disabled,
* stable sampling of traces, access logs, etc. will no longer work and only random sampling will
* be possible.
*
*
* .google.protobuf.BoolValue pack_trace_reason = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getPackTraceReasonFieldBuilder() {
if (packTraceReasonBuilder_ == null) {
packTraceReasonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getPackTraceReason(),
getParentForChildren(),
isClean());
packTraceReason_ = null;
}
return packTraceReasonBuilder_;
}
private com.google.protobuf.BoolValue useRequestIdForTraceSampling_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder> useRequestIdForTraceSamplingBuilder_;
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
* @return Whether the useRequestIdForTraceSampling field is set.
*/
public boolean hasUseRequestIdForTraceSampling() {
return useRequestIdForTraceSamplingBuilder_ != null || useRequestIdForTraceSampling_ != null;
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
* @return The useRequestIdForTraceSampling.
*/
public com.google.protobuf.BoolValue getUseRequestIdForTraceSampling() {
if (useRequestIdForTraceSamplingBuilder_ == null) {
return useRequestIdForTraceSampling_ == null ? com.google.protobuf.BoolValue.getDefaultInstance() : useRequestIdForTraceSampling_;
} else {
return useRequestIdForTraceSamplingBuilder_.getMessage();
}
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
public Builder setUseRequestIdForTraceSampling(com.google.protobuf.BoolValue value) {
if (useRequestIdForTraceSamplingBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
useRequestIdForTraceSampling_ = value;
onChanged();
} else {
useRequestIdForTraceSamplingBuilder_.setMessage(value);
}
return this;
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
public Builder setUseRequestIdForTraceSampling(
com.google.protobuf.BoolValue.Builder builderForValue) {
if (useRequestIdForTraceSamplingBuilder_ == null) {
useRequestIdForTraceSampling_ = builderForValue.build();
onChanged();
} else {
useRequestIdForTraceSamplingBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
public Builder mergeUseRequestIdForTraceSampling(com.google.protobuf.BoolValue value) {
if (useRequestIdForTraceSamplingBuilder_ == null) {
if (useRequestIdForTraceSampling_ != null) {
useRequestIdForTraceSampling_ =
com.google.protobuf.BoolValue.newBuilder(useRequestIdForTraceSampling_).mergeFrom(value).buildPartial();
} else {
useRequestIdForTraceSampling_ = value;
}
onChanged();
} else {
useRequestIdForTraceSamplingBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
public Builder clearUseRequestIdForTraceSampling() {
if (useRequestIdForTraceSamplingBuilder_ == null) {
useRequestIdForTraceSampling_ = null;
onChanged();
} else {
useRequestIdForTraceSampling_ = null;
useRequestIdForTraceSamplingBuilder_ = null;
}
return this;
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
public com.google.protobuf.BoolValue.Builder getUseRequestIdForTraceSamplingBuilder() {
onChanged();
return getUseRequestIdForTraceSamplingFieldBuilder().getBuilder();
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
public com.google.protobuf.BoolValueOrBuilder getUseRequestIdForTraceSamplingOrBuilder() {
if (useRequestIdForTraceSamplingBuilder_ != null) {
return useRequestIdForTraceSamplingBuilder_.getMessageOrBuilder();
} else {
return useRequestIdForTraceSampling_ == null ?
com.google.protobuf.BoolValue.getDefaultInstance() : useRequestIdForTraceSampling_;
}
}
/**
*
* Set whether to use :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` for sampling or not.
* This defaults to true. See the :ref:`context propagation <arch_overview_tracing_context_propagation>`
* overview for more information.
*
*
* .google.protobuf.BoolValue use_request_id_for_trace_sampling = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>
getUseRequestIdForTraceSamplingFieldBuilder() {
if (useRequestIdForTraceSamplingBuilder_ == null) {
useRequestIdForTraceSamplingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.BoolValue, com.google.protobuf.BoolValue.Builder, com.google.protobuf.BoolValueOrBuilder>(
getUseRequestIdForTraceSampling(),
getParentForChildren(),
isClean());
useRequestIdForTraceSampling_ = null;
}
return useRequestIdForTraceSamplingBuilder_;
}
@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.extensions.request_id.uuid.v3.UuidRequestIdConfig)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig)
private static final io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig();
}
public static io.envoyproxy.envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UuidRequestIdConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new UuidRequestIdConfig(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.extensions.request_id.uuid.v3.UuidRequestIdConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}