// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: envoy/config/metrics/v3/metrics_service.proto

package metricsv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	_ "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)
)

// HistogramEmitMode is used to configure which metric types should be emitted for histograms.
type HistogramEmitMode int32

const (
	// Emit Histogram and Summary metric types.
	HistogramEmitMode_SUMMARY_AND_HISTOGRAM HistogramEmitMode = 0
	// Emit only Summary metric types.
	HistogramEmitMode_SUMMARY HistogramEmitMode = 1
	// Emit only Histogram metric types.
	HistogramEmitMode_HISTOGRAM HistogramEmitMode = 2
)

// Enum value maps for HistogramEmitMode.
var (
	HistogramEmitMode_name = map[int32]string{
		0: "SUMMARY_AND_HISTOGRAM",
		1: "SUMMARY",
		2: "HISTOGRAM",
	}
	HistogramEmitMode_value = map[string]int32{
		"SUMMARY_AND_HISTOGRAM": 0,
		"SUMMARY":               1,
		"HISTOGRAM":             2,
	}
)

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

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

func (HistogramEmitMode) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_config_metrics_v3_metrics_service_proto_enumTypes[0].Descriptor()
}

func (HistogramEmitMode) Type() protoreflect.EnumType {
	return &file_envoy_config_metrics_v3_metrics_service_proto_enumTypes[0]
}

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

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

// Metrics Service is configured as a built-in “envoy.stat_sinks.metrics_service“ :ref:`StatsSink
// <envoy_v3_api_msg_config.metrics.v3.StatsSink>`. This opaque configuration will be used to create
// Metrics Service.
//
// Example:
//
// .. code-block:: yaml
//
//	stats_sinks:
//	  - name: envoy.stat_sinks.metrics_service
//	    typed_config:
//	      "@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig
//
// [#extension: envoy.stat_sinks.metrics_service]
// [#next-free-field: 7]
type MetricsServiceConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The upstream gRPC cluster that hosts the metrics service.
	GrpcService *v3.GrpcService `protobuf:"bytes,1,opt,name=grpc_service,json=grpcService,proto3" json:"grpc_service,omitempty"`
	// API version for metric service transport protocol. This describes the metric service gRPC
	// endpoint and version of messages used on the wire.
	TransportApiVersion v3.ApiVersion `protobuf:"varint,3,opt,name=transport_api_version,json=transportApiVersion,proto3,enum=envoy.config.core.v3.ApiVersion" json:"transport_api_version,omitempty"`
	// If true, counters are reported as the delta between flushing intervals. Otherwise, the current
	// counter value is reported. Defaults to false.
	// Eventually (https://github.com/envoyproxy/envoy/issues/10968) if this value is not set, the
	// sink will take updates from the :ref:`MetricsResponse <envoy_v3_api_msg_service.metrics.v3.StreamMetricsResponse>`.
	ReportCountersAsDeltas *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=report_counters_as_deltas,json=reportCountersAsDeltas,proto3" json:"report_counters_as_deltas,omitempty"`
	// If true, metrics will have their tags emitted as labels on the metrics objects sent to the MetricsService,
	// and the tag extracted name will be used instead of the full name, which may contain values used by the tag
	// extractor or additional tags added during stats creation.
	EmitTagsAsLabels bool `protobuf:"varint,4,opt,name=emit_tags_as_labels,json=emitTagsAsLabels,proto3" json:"emit_tags_as_labels,omitempty"`
	// Specify which metrics types to emit for histograms. Defaults to SUMMARY_AND_HISTOGRAM.
	HistogramEmitMode HistogramEmitMode `protobuf:"varint,5,opt,name=histogram_emit_mode,json=histogramEmitMode,proto3,enum=envoy.config.metrics.v3.HistogramEmitMode" json:"histogram_emit_mode,omitempty"`
	// The maximum number of metrics to send in a single gRPC message. If not set or set to 0,
	// all metrics will be sent in a single message (current behavior). When set to a positive value,
	// metrics will be batched into multiple messages, with each message containing at most batch_size
	// metric families. This helps avoid hitting gRPC message size limits (typically 4MB) when sending
	// large numbers of metrics.
	BatchSize     uint32 `protobuf:"varint,6,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*MetricsServiceConfig) ProtoMessage() {}

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

func (x *MetricsServiceConfig) GetGrpcService() *v3.GrpcService {
	if x != nil {
		return x.GrpcService
	}
	return nil
}

func (x *MetricsServiceConfig) GetTransportApiVersion() v3.ApiVersion {
	if x != nil {
		return x.TransportApiVersion
	}
	return v3.ApiVersion(0)
}

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

func (x *MetricsServiceConfig) GetEmitTagsAsLabels() bool {
	if x != nil {
		return x.EmitTagsAsLabels
	}
	return false
}

func (x *MetricsServiceConfig) GetHistogramEmitMode() HistogramEmitMode {
	if x != nil {
		return x.HistogramEmitMode
	}
	return HistogramEmitMode_SUMMARY_AND_HISTOGRAM
}

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

var File_envoy_config_metrics_v3_metrics_service_proto protoreflect.FileDescriptor

const file_envoy_config_metrics_v3_metrics_service_proto_rawDesc = "" +
	"\n" +
	"-envoy/config/metrics/v3/metrics_service.proto\x12\x17envoy.config.metrics.v3\x1a(envoy/config/core/v3/config_source.proto\x1a'envoy/config/core/v3/grpc_service.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\x8f\x04\n" +
	"\x14MetricsServiceConfig\x12N\n" +
	"\fgrpc_service\x18\x01 \x01(\v2!.envoy.config.core.v3.GrpcServiceB\b\xfaB\x05\x8a\x01\x02\x10\x01R\vgrpcService\x12^\n" +
	"\x15transport_api_version\x18\x03 \x01(\x0e2 .envoy.config.core.v3.ApiVersionB\b\xfaB\x05\x82\x01\x02\x10\x01R\x13transportApiVersion\x12U\n" +
	"\x19report_counters_as_deltas\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x16reportCountersAsDeltas\x12-\n" +
	"\x13emit_tags_as_labels\x18\x04 \x01(\bR\x10emitTagsAsLabels\x12d\n" +
	"\x13histogram_emit_mode\x18\x05 \x01(\x0e2*.envoy.config.metrics.v3.HistogramEmitModeB\b\xfaB\x05\x82\x01\x02\x10\x01R\x11histogramEmitMode\x12&\n" +
	"\n" +
	"batch_size\x18\x06 \x01(\rB\a\xfaB\x04*\x02(\x00R\tbatchSize:3\x9aň\x1e.\n" +
	",envoy.config.metrics.v2.MetricsServiceConfig*J\n" +
	"\x11HistogramEmitMode\x12\x19\n" +
	"\x15SUMMARY_AND_HISTOGRAM\x10\x00\x12\v\n" +
	"\aSUMMARY\x10\x01\x12\r\n" +
	"\tHISTOGRAM\x10\x02B\x90\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"%io.envoyproxy.envoy.config.metrics.v3B\x13MetricsServiceProtoP\x01ZHgithub.com/envoyproxy/go-control-plane/envoy/config/metrics/v3;metricsv3b\x06proto3"

var (
	file_envoy_config_metrics_v3_metrics_service_proto_rawDescOnce sync.Once
	file_envoy_config_metrics_v3_metrics_service_proto_rawDescData []byte
)

func file_envoy_config_metrics_v3_metrics_service_proto_rawDescGZIP() []byte {
	file_envoy_config_metrics_v3_metrics_service_proto_rawDescOnce.Do(func() {
		file_envoy_config_metrics_v3_metrics_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_metrics_v3_metrics_service_proto_rawDesc), len(file_envoy_config_metrics_v3_metrics_service_proto_rawDesc)))
	})
	return file_envoy_config_metrics_v3_metrics_service_proto_rawDescData
}

var file_envoy_config_metrics_v3_metrics_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_envoy_config_metrics_v3_metrics_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_config_metrics_v3_metrics_service_proto_goTypes = []any{
	(HistogramEmitMode)(0),       // 0: envoy.config.metrics.v3.HistogramEmitMode
	(*MetricsServiceConfig)(nil), // 1: envoy.config.metrics.v3.MetricsServiceConfig
	(*v3.GrpcService)(nil),       // 2: envoy.config.core.v3.GrpcService
	(v3.ApiVersion)(0),           // 3: envoy.config.core.v3.ApiVersion
	(*wrapperspb.BoolValue)(nil), // 4: google.protobuf.BoolValue
}
var file_envoy_config_metrics_v3_metrics_service_proto_depIdxs = []int32{
	2, // 0: envoy.config.metrics.v3.MetricsServiceConfig.grpc_service:type_name -> envoy.config.core.v3.GrpcService
	3, // 1: envoy.config.metrics.v3.MetricsServiceConfig.transport_api_version:type_name -> envoy.config.core.v3.ApiVersion
	4, // 2: envoy.config.metrics.v3.MetricsServiceConfig.report_counters_as_deltas:type_name -> google.protobuf.BoolValue
	0, // 3: envoy.config.metrics.v3.MetricsServiceConfig.histogram_emit_mode:type_name -> envoy.config.metrics.v3.HistogramEmitMode
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_envoy_config_metrics_v3_metrics_service_proto_init() }
func file_envoy_config_metrics_v3_metrics_service_proto_init() {
	if File_envoy_config_metrics_v3_metrics_service_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_config_metrics_v3_metrics_service_proto_rawDesc), len(file_envoy_config_metrics_v3_metrics_service_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_metrics_v3_metrics_service_proto_goTypes,
		DependencyIndexes: file_envoy_config_metrics_v3_metrics_service_proto_depIdxs,
		EnumInfos:         file_envoy_config_metrics_v3_metrics_service_proto_enumTypes,
		MessageInfos:      file_envoy_config_metrics_v3_metrics_service_proto_msgTypes,
	}.Build()
	File_envoy_config_metrics_v3_metrics_service_proto = out.File
	file_envoy_config_metrics_v3_metrics_service_proto_goTypes = nil
	file_envoy_config_metrics_v3_metrics_service_proto_depIdxs = nil
}
