// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/extensions/stat_sinks/open_telemetry/v3/open_telemetry.proto

package open_telemetryv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v31 "github.com/cncf/xds/go/xds/type/matcher/v3"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	v1 "go.opentelemetry.io/proto/otlp/common/v1"
	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)
)

// [#next-free-field: 11]
type SinkConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to ProtocolSpecifier:
	//
	//	*SinkConfig_GrpcService
	//	*SinkConfig_HttpService
	ProtocolSpecifier isSinkConfig_ProtocolSpecifier `protobuf_oneof:"protocol_specifier"`
	// Attributes to be associated with the resource in the OTLP message.
	// [#extension-category: envoy.tracers.opentelemetry.resource_detectors]
	ResourceDetectors []*v3.TypedExtensionConfig `protobuf:"bytes,7,rep,name=resource_detectors,json=resourceDetectors,proto3" json:"resource_detectors,omitempty"`
	// If set to true, counters will be emitted as deltas, and the OTLP message will have
	// “AGGREGATION_TEMPORALITY_DELTA“ set as AggregationTemporality.
	ReportCountersAsDeltas bool `protobuf:"varint,2,opt,name=report_counters_as_deltas,json=reportCountersAsDeltas,proto3" json:"report_counters_as_deltas,omitempty"`
	// If set to true, histograms will be emitted as deltas, and the OTLP message will have
	// “AGGREGATION_TEMPORALITY_DELTA“ set as AggregationTemporality.
	ReportHistogramsAsDeltas bool `protobuf:"varint,3,opt,name=report_histograms_as_deltas,json=reportHistogramsAsDeltas,proto3" json:"report_histograms_as_deltas,omitempty"`
	// If set to true, metrics will have their tags emitted as OTLP attributes, which may
	// contain values used by the tag extractor or additional tags added during stats creation.
	// Otherwise, no attributes will be associated with the export message. Default value is true.
	EmitTagsAsAttributes *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=emit_tags_as_attributes,json=emitTagsAsAttributes,proto3" json:"emit_tags_as_attributes,omitempty"`
	// If set to true, metric names will be represented as the tag extracted name instead
	// of the full metric name. Default value is true.
	UseTagExtractedName *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=use_tag_extracted_name,json=useTagExtractedName,proto3" json:"use_tag_extracted_name,omitempty"`
	// If set, emitted stats names will be prepended with a prefix, so full stat name will be
	// <prefix>.<stats_name>. For example, if the stat name is "foo.bar" and prefix is
	// "pre", the full stat name will be "pre.foo.bar". If this field is not set, there is no
	// prefix added. According to the example, the full stat name will remain "foo.bar".
	Prefix string `protobuf:"bytes,6,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// The custom conversion from a stat to a metric. Currently, the only supported input is
	// “envoy.extensions.matching.common_inputs.stats.v3.StatFullNameMatchInput“.
	// The supported actions are
	// - “envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.DropAction“.
	// - “envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.ConversionAction“.
	// If stats are not matched, they will be directly converted to OTLP metrics as usual.
	CustomMetricConversions *v31.Matcher `protobuf:"bytes,8,opt,name=custom_metric_conversions,json=customMetricConversions,proto3" json:"custom_metric_conversions,omitempty"`
	// Maximum number of data points per request. If explicitly set to 0, there is no limit. If unset, it currently defaults to no limit.
	// When the maximum number of data points is reached, the remaining data points will be sent in subsequent requests.
	MaxDataPointsPerRequest uint32 `protobuf:"varint,10,opt,name=max_data_points_per_request,json=maxDataPointsPerRequest,proto3" json:"max_data_points_per_request,omitempty"`
	unknownFields           protoimpl.UnknownFields
	sizeCache               protoimpl.SizeCache
}

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

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

func (*SinkConfig) ProtoMessage() {}

func (x *SinkConfig) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_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 SinkConfig.ProtoReflect.Descriptor instead.
func (*SinkConfig) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescGZIP(), []int{0}
}

func (x *SinkConfig) GetProtocolSpecifier() isSinkConfig_ProtocolSpecifier {
	if x != nil {
		return x.ProtocolSpecifier
	}
	return nil
}

func (x *SinkConfig) GetGrpcService() *v3.GrpcService {
	if x != nil {
		if x, ok := x.ProtocolSpecifier.(*SinkConfig_GrpcService); ok {
			return x.GrpcService
		}
	}
	return nil
}

func (x *SinkConfig) GetHttpService() *v3.HttpService {
	if x != nil {
		if x, ok := x.ProtocolSpecifier.(*SinkConfig_HttpService); ok {
			return x.HttpService
		}
	}
	return nil
}

func (x *SinkConfig) GetResourceDetectors() []*v3.TypedExtensionConfig {
	if x != nil {
		return x.ResourceDetectors
	}
	return nil
}

func (x *SinkConfig) GetReportCountersAsDeltas() bool {
	if x != nil {
		return x.ReportCountersAsDeltas
	}
	return false
}

func (x *SinkConfig) GetReportHistogramsAsDeltas() bool {
	if x != nil {
		return x.ReportHistogramsAsDeltas
	}
	return false
}

func (x *SinkConfig) GetEmitTagsAsAttributes() *wrapperspb.BoolValue {
	if x != nil {
		return x.EmitTagsAsAttributes
	}
	return nil
}

func (x *SinkConfig) GetUseTagExtractedName() *wrapperspb.BoolValue {
	if x != nil {
		return x.UseTagExtractedName
	}
	return nil
}

func (x *SinkConfig) GetPrefix() string {
	if x != nil {
		return x.Prefix
	}
	return ""
}

func (x *SinkConfig) GetCustomMetricConversions() *v31.Matcher {
	if x != nil {
		return x.CustomMetricConversions
	}
	return nil
}

func (x *SinkConfig) GetMaxDataPointsPerRequest() uint32 {
	if x != nil {
		return x.MaxDataPointsPerRequest
	}
	return 0
}

type isSinkConfig_ProtocolSpecifier interface {
	isSinkConfig_ProtocolSpecifier()
}

type SinkConfig_GrpcService struct {
	// The upstream gRPC cluster that implements the OTLP/gRPC collector.
	GrpcService *v3.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3,oneof"`
}

type SinkConfig_HttpService struct {
	// The upstream HTTP cluster that implements the OTLP/HTTP collector.
	// See `OTLP/HTTP <https://opentelemetry.io/docs/specs/otlp/#otlphttp>`_.
	//
	// .. note::
	//
	//	The ``request_headers_to_add`` property in the OTLP HTTP exporter service
	//	does not support the :ref:`format specifier <config_access_log_format>`.
	//	The values configured are added as HTTP headers on the OTLP export request
	//	without any formatting applied.
	HttpService *v3.HttpService `protobuf:"bytes,9,opt,name=http_service,json=httpService,proto3,oneof"`
}

func (*SinkConfig_GrpcService) isSinkConfig_ProtocolSpecifier() {}

func (*SinkConfig_HttpService) isSinkConfig_ProtocolSpecifier() {}

// ConversionAction is used to convert a stat to a metric. If a stat matches,
// the metric_name and static_metric_labels will be
// used to create the metric. This can be used to rename a
// stat, add static labels, and aggregate multiple stats into a single metric.
type SinkConfig_ConversionAction struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The metric name to use for the stat.
	MetricName string `protobuf:"bytes,2,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"`
	// Static metric labels to use for the metric.
	StaticMetricLabels []*v1.KeyValue `protobuf:"bytes,3,rep,name=static_metric_labels,json=staticMetricLabels,proto3" json:"static_metric_labels,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *SinkConfig_ConversionAction) Reset() {
	*x = SinkConfig_ConversionAction{}
	mi := &file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*SinkConfig_ConversionAction) ProtoMessage() {}

func (x *SinkConfig_ConversionAction) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_msgTypes[1]
	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 SinkConfig_ConversionAction.ProtoReflect.Descriptor instead.
func (*SinkConfig_ConversionAction) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescGZIP(), []int{0, 0}
}

func (x *SinkConfig_ConversionAction) GetMetricName() string {
	if x != nil {
		return x.MetricName
	}
	return ""
}

func (x *SinkConfig_ConversionAction) GetStaticMetricLabels() []*v1.KeyValue {
	if x != nil {
		return x.StaticMetricLabels
	}
	return nil
}

// DropAction is an action that, when matched, will prevent the stat from being converted to an OTLP metric and flushed.
type SinkConfig_DropAction struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SinkConfig_DropAction) Reset() {
	*x = SinkConfig_DropAction{}
	mi := &file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*SinkConfig_DropAction) ProtoMessage() {}

func (x *SinkConfig_DropAction) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_msgTypes[2]
	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 SinkConfig_DropAction.ProtoReflect.Descriptor instead.
func (*SinkConfig_DropAction) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescGZIP(), []int{0, 1}
}

var File_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto protoreflect.FileDescriptor

const file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDesc = "" +
	"\n" +
	"Benvoy/extensions/stat_sinks/open_telemetry/v3/open_telemetry.proto\x12-envoy.extensions.stat_sinks.open_telemetry.v3\x1a$envoy/config/core/v3/extension.proto\x1a'envoy/config/core/v3/grpc_service.proto\x1a'envoy/config/core/v3/http_service.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a*opentelemetry/proto/common/v1/common.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\x89\a\n" +
	"\n" +
	"SinkConfig\x12P\n" +
	"\fgrpc_service\x18\x01 \x01(\v2!.envoy.config.core.v3.GrpcServiceB\b\xfaB\x05\x8a\x01\x02\x10\x01H\x00R\vgrpcService\x12F\n" +
	"\fhttp_service\x18\t \x01(\v2!.envoy.config.core.v3.HttpServiceH\x00R\vhttpService\x12Y\n" +
	"\x12resource_detectors\x18\a \x03(\v2*.envoy.config.core.v3.TypedExtensionConfigR\x11resourceDetectors\x129\n" +
	"\x19report_counters_as_deltas\x18\x02 \x01(\bR\x16reportCountersAsDeltas\x12=\n" +
	"\x1breport_histograms_as_deltas\x18\x03 \x01(\bR\x18reportHistogramsAsDeltas\x12Q\n" +
	"\x17emit_tags_as_attributes\x18\x04 \x01(\v2\x1a.google.protobuf.BoolValueR\x14emitTagsAsAttributes\x12O\n" +
	"\x16use_tag_extracted_name\x18\x05 \x01(\v2\x1a.google.protobuf.BoolValueR\x13useTagExtractedName\x12\x16\n" +
	"\x06prefix\x18\x06 \x01(\tR\x06prefix\x12X\n" +
	"\x19custom_metric_conversions\x18\b \x01(\v2\x1c.xds.type.matcher.v3.MatcherR\x17customMetricConversions\x12<\n" +
	"\x1bmax_data_points_per_request\x18\n" +
	" \x01(\rR\x17maxDataPointsPerRequest\x1a\x8e\x01\n" +
	"\x10ConversionAction\x12\x1f\n" +
	"\vmetric_name\x18\x02 \x01(\tR\n" +
	"metricName\x12Y\n" +
	"\x14static_metric_labels\x18\x03 \x03(\v2'.opentelemetry.proto.common.v1.KeyValueR\x12staticMetricLabels\x1a\f\n" +
	"\n" +
	"DropActionB\x19\n" +
	"\x12protocol_specifier\x12\x03\xf8B\x01B\xc2\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	";io.envoyproxy.envoy.extensions.stat_sinks.open_telemetry.v3B\x12OpenTelemetryProtoP\x01Zegithub.com/envoyproxy/go-control-plane/envoy/extensions/stat_sinks/open_telemetry/v3;open_telemetryv3b\x06proto3"

var (
	file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescOnce sync.Once
	file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescData []byte
)

func file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescGZIP() []byte {
	file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDesc), len(file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDesc)))
	})
	return file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDescData
}

var file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_goTypes = []any{
	(*SinkConfig)(nil),                  // 0: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig
	(*SinkConfig_ConversionAction)(nil), // 1: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.ConversionAction
	(*SinkConfig_DropAction)(nil),       // 2: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.DropAction
	(*v3.GrpcService)(nil),              // 3: envoy.config.core.v3.GrpcService
	(*v3.HttpService)(nil),              // 4: envoy.config.core.v3.HttpService
	(*v3.TypedExtensionConfig)(nil),     // 5: envoy.config.core.v3.TypedExtensionConfig
	(*wrapperspb.BoolValue)(nil),        // 6: google.protobuf.BoolValue
	(*v31.Matcher)(nil),                 // 7: xds.type.matcher.v3.Matcher
	(*v1.KeyValue)(nil),                 // 8: opentelemetry.proto.common.v1.KeyValue
}
var file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_depIdxs = []int32{
	3, // 0: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.grpc_service:type_name -> envoy.config.core.v3.GrpcService
	4, // 1: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.http_service:type_name -> envoy.config.core.v3.HttpService
	5, // 2: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.resource_detectors:type_name -> envoy.config.core.v3.TypedExtensionConfig
	6, // 3: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.emit_tags_as_attributes:type_name -> google.protobuf.BoolValue
	6, // 4: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.use_tag_extracted_name:type_name -> google.protobuf.BoolValue
	7, // 5: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.custom_metric_conversions:type_name -> xds.type.matcher.v3.Matcher
	8, // 6: envoy.extensions.stat_sinks.open_telemetry.v3.SinkConfig.ConversionAction.static_metric_labels:type_name -> opentelemetry.proto.common.v1.KeyValue
	7, // [7:7] is the sub-list for method output_type
	7, // [7:7] is the sub-list for method input_type
	7, // [7:7] is the sub-list for extension type_name
	7, // [7:7] is the sub-list for extension extendee
	0, // [0:7] is the sub-list for field type_name
}

func init() { file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_init() }
func file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_init() {
	if File_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto != nil {
		return
	}
	file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_msgTypes[0].OneofWrappers = []any{
		(*SinkConfig_GrpcService)(nil),
		(*SinkConfig_HttpService)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDesc), len(file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_msgTypes,
	}.Build()
	File_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto = out.File
	file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_goTypes = nil
	file_envoy_extensions_stat_sinks_open_telemetry_v3_open_telemetry_proto_depIdxs = nil
}
