
io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/extensions/tracers/opentelemetry/samplers/v3/dynatrace_sampler.proto
// Protobuf Java Version: 3.25.1
package io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3;
/**
*
* Configuration for the Dynatrace Sampler extension.
* [#extension: envoy.tracers.opentelemetry.samplers.dynatrace]
*
*
* Protobuf type {@code envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig}
*/
public final class DynatraceSamplerConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig)
DynatraceSamplerConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use DynatraceSamplerConfig.newBuilder() to construct.
private DynatraceSamplerConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DynatraceSamplerConfig() {
tenant_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DynatraceSamplerConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerProto.internal_static_envoy_extensions_tracers_opentelemetry_samplers_v3_DynatraceSamplerConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerProto.internal_static_envoy_extensions_tracers_opentelemetry_samplers_v3_DynatraceSamplerConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig.class, io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig.Builder.class);
}
private int bitField0_;
public static final int TENANT_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object tenant_ = "";
/**
*
* The Dynatrace tenant.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* string tenant = 1;
* @return The tenant.
*/
@java.lang.Override
public java.lang.String getTenant() {
java.lang.Object ref = tenant_;
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();
tenant_ = s;
return s;
}
}
/**
*
* The Dynatrace tenant.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* string tenant = 1;
* @return The bytes for tenant.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTenantBytes() {
java.lang.Object ref = tenant_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tenant_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLUSTER_ID_FIELD_NUMBER = 2;
private int clusterId_ = 0;
/**
*
* The id of the Dynatrace cluster id.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* int32 cluster_id = 2;
* @return The clusterId.
*/
@java.lang.Override
public int getClusterId() {
return clusterId_;
}
public static final int HTTP_SERVICE_FIELD_NUMBER = 3;
private io.envoyproxy.envoy.config.core.v3.HttpService httpService_;
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
* @return Whether the httpService field is set.
*/
@java.lang.Override
public boolean hasHttpService() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
* @return The httpService.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.HttpService getHttpService() {
return httpService_ == null ? io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder getHttpServiceOrBuilder() {
return httpService_ == null ? io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
}
public static final int ROOT_SPANS_PER_MINUTE_FIELD_NUMBER = 4;
private int rootSpansPerMinute_ = 0;
/**
*
* Default number of root spans per minute, used when the value can't be obtained from the Dynatrace API.
*
* A default value of ``1000`` is used when:
*
* - ``root_spans_per_minute`` is unset
* - ``root_spans_per_minute`` is set to 0
*
*
* uint32 root_spans_per_minute = 4;
* @return The rootSpansPerMinute.
*/
@java.lang.Override
public int getRootSpansPerMinute() {
return rootSpansPerMinute_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tenant_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tenant_);
}
if (clusterId_ != 0) {
output.writeInt32(2, clusterId_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getHttpService());
}
if (rootSpansPerMinute_ != 0) {
output.writeUInt32(4, rootSpansPerMinute_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tenant_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tenant_);
}
if (clusterId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, clusterId_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getHttpService());
}
if (rootSpansPerMinute_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(4, rootSpansPerMinute_);
}
size += getUnknownFields().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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig other = (io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig) obj;
if (!getTenant()
.equals(other.getTenant())) return false;
if (getClusterId()
!= other.getClusterId()) return false;
if (hasHttpService() != other.hasHttpService()) return false;
if (hasHttpService()) {
if (!getHttpService()
.equals(other.getHttpService())) return false;
}
if (getRootSpansPerMinute()
!= other.getRootSpansPerMinute()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TENANT_FIELD_NUMBER;
hash = (53 * hash) + getTenant().hashCode();
hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER;
hash = (53 * hash) + getClusterId();
if (hasHttpService()) {
hash = (37 * hash) + HTTP_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getHttpService().hashCode();
}
hash = (37 * hash) + ROOT_SPANS_PER_MINUTE_FIELD_NUMBER;
hash = (53 * hash) + getRootSpansPerMinute();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig 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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig 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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig 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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig 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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig 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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig 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 Dynatrace Sampler extension.
* [#extension: envoy.tracers.opentelemetry.samplers.dynatrace]
*
*
* Protobuf type {@code envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig)
io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerProto.internal_static_envoy_extensions_tracers_opentelemetry_samplers_v3_DynatraceSamplerConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerProto.internal_static_envoy_extensions_tracers_opentelemetry_samplers_v3_DynatraceSamplerConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig.class, io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getHttpServiceFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tenant_ = "";
clusterId_ = 0;
httpService_ = null;
if (httpServiceBuilder_ != null) {
httpServiceBuilder_.dispose();
httpServiceBuilder_ = null;
}
rootSpansPerMinute_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerProto.internal_static_envoy_extensions_tracers_opentelemetry_samplers_v3_DynatraceSamplerConfig_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig build() {
io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig buildPartial() {
io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig result = new io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tenant_ = tenant_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.clusterId_ = clusterId_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.httpService_ = httpServiceBuilder_ == null
? httpService_
: httpServiceBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.rootSpansPerMinute_ = rootSpansPerMinute_;
}
result.bitField0_ |= to_bitField0_;
}
@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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig) {
return mergeFrom((io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig other) {
if (other == io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig.getDefaultInstance()) return this;
if (!other.getTenant().isEmpty()) {
tenant_ = other.tenant_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getClusterId() != 0) {
setClusterId(other.getClusterId());
}
if (other.hasHttpService()) {
mergeHttpService(other.getHttpService());
}
if (other.getRootSpansPerMinute() != 0) {
setRootSpansPerMinute(other.getRootSpansPerMinute());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
tenant_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
clusterId_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
input.readMessage(
getHttpServiceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
rootSpansPerMinute_ = input.readUInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object tenant_ = "";
/**
*
* The Dynatrace tenant.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* string tenant = 1;
* @return The tenant.
*/
public java.lang.String getTenant() {
java.lang.Object ref = tenant_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tenant_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The Dynatrace tenant.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* string tenant = 1;
* @return The bytes for tenant.
*/
public com.google.protobuf.ByteString
getTenantBytes() {
java.lang.Object ref = tenant_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tenant_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The Dynatrace tenant.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* string tenant = 1;
* @param value The tenant to set.
* @return This builder for chaining.
*/
public Builder setTenant(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
tenant_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The Dynatrace tenant.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* string tenant = 1;
* @return This builder for chaining.
*/
public Builder clearTenant() {
tenant_ = getDefaultInstance().getTenant();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The Dynatrace tenant.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* string tenant = 1;
* @param value The bytes for tenant to set.
* @return This builder for chaining.
*/
public Builder setTenantBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
tenant_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int clusterId_ ;
/**
*
* The id of the Dynatrace cluster id.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* int32 cluster_id = 2;
* @return The clusterId.
*/
@java.lang.Override
public int getClusterId() {
return clusterId_;
}
/**
*
* The id of the Dynatrace cluster id.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* int32 cluster_id = 2;
* @param value The clusterId to set.
* @return This builder for chaining.
*/
public Builder setClusterId(int value) {
clusterId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The id of the Dynatrace cluster id.
*
* The value can be obtained from the Envoy deployment page in Dynatrace.
*
*
* int32 cluster_id = 2;
* @return This builder for chaining.
*/
public Builder clearClusterId() {
bitField0_ = (bitField0_ & ~0x00000002);
clusterId_ = 0;
onChanged();
return this;
}
private io.envoyproxy.envoy.config.core.v3.HttpService httpService_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpService, io.envoyproxy.envoy.config.core.v3.HttpService.Builder, io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder> httpServiceBuilder_;
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
* @return Whether the httpService field is set.
*/
public boolean hasHttpService() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
* @return The httpService.
*/
public io.envoyproxy.envoy.config.core.v3.HttpService getHttpService() {
if (httpServiceBuilder_ == null) {
return httpService_ == null ? io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
} else {
return httpServiceBuilder_.getMessage();
}
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
public Builder setHttpService(io.envoyproxy.envoy.config.core.v3.HttpService value) {
if (httpServiceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
httpService_ = value;
} else {
httpServiceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
public Builder setHttpService(
io.envoyproxy.envoy.config.core.v3.HttpService.Builder builderForValue) {
if (httpServiceBuilder_ == null) {
httpService_ = builderForValue.build();
} else {
httpServiceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
public Builder mergeHttpService(io.envoyproxy.envoy.config.core.v3.HttpService value) {
if (httpServiceBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
httpService_ != null &&
httpService_ != io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance()) {
getHttpServiceBuilder().mergeFrom(value);
} else {
httpService_ = value;
}
} else {
httpServiceBuilder_.mergeFrom(value);
}
if (httpService_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
public Builder clearHttpService() {
bitField0_ = (bitField0_ & ~0x00000004);
httpService_ = null;
if (httpServiceBuilder_ != null) {
httpServiceBuilder_.dispose();
httpServiceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
public io.envoyproxy.envoy.config.core.v3.HttpService.Builder getHttpServiceBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getHttpServiceFieldBuilder().getBuilder();
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
public io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder getHttpServiceOrBuilder() {
if (httpServiceBuilder_ != null) {
return httpServiceBuilder_.getMessageOrBuilder();
} else {
return httpService_ == null ?
io.envoyproxy.envoy.config.core.v3.HttpService.getDefaultInstance() : httpService_;
}
}
/**
*
* The HTTP service to fetch the sampler configuration from the Dynatrace API (root spans per minute). For example:
*
* .. code-block:: yaml
*
* http_service:
* http_uri:
* cluster: dynatrace
* uri: <tenant>.dev.dynatracelabs.com/api/v2/samplingConfiguration
* timeout: 10s
* request_headers_to_add:
* - header:
* key : "authorization"
* value: "Api-Token dt..."
*
*
* .envoy.config.core.v3.HttpService http_service = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpService, io.envoyproxy.envoy.config.core.v3.HttpService.Builder, io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder>
getHttpServiceFieldBuilder() {
if (httpServiceBuilder_ == null) {
httpServiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpService, io.envoyproxy.envoy.config.core.v3.HttpService.Builder, io.envoyproxy.envoy.config.core.v3.HttpServiceOrBuilder>(
getHttpService(),
getParentForChildren(),
isClean());
httpService_ = null;
}
return httpServiceBuilder_;
}
private int rootSpansPerMinute_ ;
/**
*
* Default number of root spans per minute, used when the value can't be obtained from the Dynatrace API.
*
* A default value of ``1000`` is used when:
*
* - ``root_spans_per_minute`` is unset
* - ``root_spans_per_minute`` is set to 0
*
*
* uint32 root_spans_per_minute = 4;
* @return The rootSpansPerMinute.
*/
@java.lang.Override
public int getRootSpansPerMinute() {
return rootSpansPerMinute_;
}
/**
*
* Default number of root spans per minute, used when the value can't be obtained from the Dynatrace API.
*
* A default value of ``1000`` is used when:
*
* - ``root_spans_per_minute`` is unset
* - ``root_spans_per_minute`` is set to 0
*
*
* uint32 root_spans_per_minute = 4;
* @param value The rootSpansPerMinute to set.
* @return This builder for chaining.
*/
public Builder setRootSpansPerMinute(int value) {
rootSpansPerMinute_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Default number of root spans per minute, used when the value can't be obtained from the Dynatrace API.
*
* A default value of ``1000`` is used when:
*
* - ``root_spans_per_minute`` is unset
* - ``root_spans_per_minute`` is set to 0
*
*
* uint32 root_spans_per_minute = 4;
* @return This builder for chaining.
*/
public Builder clearRootSpansPerMinute() {
bitField0_ = (bitField0_ & ~0x00000008);
rootSpansPerMinute_ = 0;
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.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig)
private static final io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig();
}
public static io.envoyproxy.envoy.extensions.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DynatraceSamplerConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.tracers.opentelemetry.samplers.v3.DynatraceSamplerConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy