// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: contrib/envoy/extensions/stat_sinks/kafka/v3/kafka_stats_sink.proto

package kafkav3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Serialization format for metrics produced to Kafka.
type SerializationFormat int32

const (
	// JSON serialization. Metrics are encoded as human-readable JSON objects.
	SerializationFormat_JSON SerializationFormat = 0
	// Protocol Buffers serialization. Each Kafka message value is a binary-serialized
	// “envoy.service.metrics.v3.StreamMetricsMessage“ containing
	// “io.prometheus.client.MetricFamily“ entries -- the same wire format used by
	// the gRPC “envoy.stat_sinks.metrics_service“ sink.
	SerializationFormat_PROTOBUF SerializationFormat = 1
)

// Enum value maps for SerializationFormat.
var (
	SerializationFormat_name = map[int32]string{
		0: "JSON",
		1: "PROTOBUF",
	}
	SerializationFormat_value = map[string]int32{
		"JSON":     0,
		"PROTOBUF": 1,
	}
)

func (x SerializationFormat) Enum() *SerializationFormat {
	p := new(SerializationFormat)
	*p = x
	return p
}

func (x SerializationFormat) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (SerializationFormat) Descriptor() protoreflect.EnumDescriptor {
	return file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_enumTypes[0].Descriptor()
}

func (SerializationFormat) Type() protoreflect.EnumType {
	return &file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_enumTypes[0]
}

func (x SerializationFormat) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use SerializationFormat.Descriptor instead.
func (SerializationFormat) EnumDescriptor() ([]byte, []int) {
	return file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescGZIP(), []int{0}
}

// Configuration for the Kafka stats sink. Metrics are serialized and
// produced to a Kafka topic using librdkafka.
// [#next-free-field: 9]
type KafkaStatsSinkConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Comma-separated list of Kafka broker addresses in host:port format.
	// At least one broker must be specified.
	BrokerList string `protobuf:"bytes,1,opt,name=broker_list,json=brokerList,proto3" json:"broker_list,omitempty"`
	// Kafka topic to produce metrics to.
	Topic string `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
	// Number of metrics to batch into a single Kafka message. If 0 or unset,
	// all metrics from a single flush are sent in one message. Setting a batch
	// size helps control message sizes when there are many metrics.
	BatchSize uint32 `protobuf:"varint,3,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
	// If true, counters are reported as the delta since last flush rather than
	// the absolute cumulative value. Defaults to false.
	ReportCountersAsDeltas *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=report_counters_as_deltas,json=reportCountersAsDeltas,proto3" json:"report_counters_as_deltas,omitempty"`
	// If true, tag-extracted metric names are used and tags are emitted as
	// separate labels/JSON fields. If false, the full metric name (including tag
	// values) is used. Defaults to true.
	EmitTagsAsLabels *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=emit_tags_as_labels,json=emitTagsAsLabels,proto3" json:"emit_tags_as_labels,omitempty"`
	// Additional librdkafka producer configuration properties as key-value pairs.
	// These are passed directly to librdkafka and can be used to configure
	// compression (“compression.type“), authentication (“security.protocol“,
	// “sasl.mechanism“, etc.), batching (“batch.num.messages“), and more.
	// See https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md
	ProducerConfig map[string]string `protobuf:"bytes,6,rep,name=producer_config,json=producerConfig,proto3" json:"producer_config,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// Maximum time in milliseconds to buffer messages before forcing a produce.
	// Maps to librdkafka's “linger.ms“. If not set, defaults to 500ms.
	BufferFlushTimeoutMs *wrapperspb.UInt32Value `protobuf:"bytes,7,opt,name=buffer_flush_timeout_ms,json=bufferFlushTimeoutMs,proto3" json:"buffer_flush_timeout_ms,omitempty"`
	// Serialization format for metric messages produced to Kafka.
	// Defaults to JSON.
	Format        SerializationFormat `protobuf:"varint,8,opt,name=format,proto3,enum=envoy.extensions.stat_sinks.kafka.v3.SerializationFormat" json:"format,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *KafkaStatsSinkConfig) Reset() {
	*x = KafkaStatsSinkConfig{}
	mi := &file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *KafkaStatsSinkConfig) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*KafkaStatsSinkConfig) ProtoMessage() {}

func (x *KafkaStatsSinkConfig) ProtoReflect() protoreflect.Message {
	mi := &file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use KafkaStatsSinkConfig.ProtoReflect.Descriptor instead.
func (*KafkaStatsSinkConfig) Descriptor() ([]byte, []int) {
	return file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescGZIP(), []int{0}
}

func (x *KafkaStatsSinkConfig) GetBrokerList() string {
	if x != nil {
		return x.BrokerList
	}
	return ""
}

func (x *KafkaStatsSinkConfig) GetTopic() string {
	if x != nil {
		return x.Topic
	}
	return ""
}

func (x *KafkaStatsSinkConfig) GetBatchSize() uint32 {
	if x != nil {
		return x.BatchSize
	}
	return 0
}

func (x *KafkaStatsSinkConfig) GetReportCountersAsDeltas() *wrapperspb.BoolValue {
	if x != nil {
		return x.ReportCountersAsDeltas
	}
	return nil
}

func (x *KafkaStatsSinkConfig) GetEmitTagsAsLabels() *wrapperspb.BoolValue {
	if x != nil {
		return x.EmitTagsAsLabels
	}
	return nil
}

func (x *KafkaStatsSinkConfig) GetProducerConfig() map[string]string {
	if x != nil {
		return x.ProducerConfig
	}
	return nil
}

func (x *KafkaStatsSinkConfig) GetBufferFlushTimeoutMs() *wrapperspb.UInt32Value {
	if x != nil {
		return x.BufferFlushTimeoutMs
	}
	return nil
}

func (x *KafkaStatsSinkConfig) GetFormat() SerializationFormat {
	if x != nil {
		return x.Format
	}
	return SerializationFormat_JSON
}

var File_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto protoreflect.FileDescriptor

const file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDesc = "" +
	"\n" +
	"Ccontrib/envoy/extensions/stat_sinks/kafka/v3/kafka_stats_sink.proto\x12$envoy.extensions.stat_sinks.kafka.v3\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\x8d\x05\n" +
	"\x14KafkaStatsSinkConfig\x12(\n" +
	"\vbroker_list\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\n" +
	"brokerList\x12\x1d\n" +
	"\x05topic\x18\x02 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x05topic\x12&\n" +
	"\n" +
	"batch_size\x18\x03 \x01(\rB\a\xfaB\x04*\x02(\x00R\tbatchSize\x12U\n" +
	"\x19report_counters_as_deltas\x18\x04 \x01(\v2\x1a.google.protobuf.BoolValueR\x16reportCountersAsDeltas\x12I\n" +
	"\x13emit_tags_as_labels\x18\x05 \x01(\v2\x1a.google.protobuf.BoolValueR\x10emitTagsAsLabels\x12w\n" +
	"\x0fproducer_config\x18\x06 \x03(\v2N.envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.ProducerConfigEntryR\x0eproducerConfig\x12S\n" +
	"\x17buffer_flush_timeout_ms\x18\a \x01(\v2\x1c.google.protobuf.UInt32ValueR\x14bufferFlushTimeoutMs\x12Q\n" +
	"\x06format\x18\b \x01(\x0e29.envoy.extensions.stat_sinks.kafka.v3.SerializationFormatR\x06format\x1aA\n" +
	"\x13ProducerConfigEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
	"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01*-\n" +
	"\x13SerializationFormat\x12\b\n" +
	"\x04JSON\x10\x00\x12\f\n" +
	"\bPROTOBUF\x10\x01B\xb0\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"2io.envoyproxy.envoy.extensions.stat_sinks.kafka.v3B\x13KafkaStatsSinkProtoP\x01Z[github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/stat_sinks/kafka/v3;kafkav3b\x06proto3"

var (
	file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescOnce sync.Once
	file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescData []byte
)

func file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescGZIP() []byte {
	file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescOnce.Do(func() {
		file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDesc), len(file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDesc)))
	})
	return file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDescData
}

var file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_goTypes = []any{
	(SerializationFormat)(0),       // 0: envoy.extensions.stat_sinks.kafka.v3.SerializationFormat
	(*KafkaStatsSinkConfig)(nil),   // 1: envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig
	nil,                            // 2: envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.ProducerConfigEntry
	(*wrapperspb.BoolValue)(nil),   // 3: google.protobuf.BoolValue
	(*wrapperspb.UInt32Value)(nil), // 4: google.protobuf.UInt32Value
}
var file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_depIdxs = []int32{
	3, // 0: envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.report_counters_as_deltas:type_name -> google.protobuf.BoolValue
	3, // 1: envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.emit_tags_as_labels:type_name -> google.protobuf.BoolValue
	2, // 2: envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.producer_config:type_name -> envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.ProducerConfigEntry
	4, // 3: envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.buffer_flush_timeout_ms:type_name -> google.protobuf.UInt32Value
	0, // 4: envoy.extensions.stat_sinks.kafka.v3.KafkaStatsSinkConfig.format:type_name -> envoy.extensions.stat_sinks.kafka.v3.SerializationFormat
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_init() }
func file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_init() {
	if File_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDesc), len(file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_goTypes,
		DependencyIndexes: file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_depIdxs,
		EnumInfos:         file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_enumTypes,
		MessageInfos:      file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_msgTypes,
	}.Build()
	File_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto = out.File
	file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_goTypes = nil
	file_contrib_envoy_extensions_stat_sinks_kafka_v3_kafka_stats_sink_proto_depIdxs = nil
}
