// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: contrib/envoy/extensions/filters/listener/postgres_inspector/v3alpha/postgres_inspector.proto

package v3alpha

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"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	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)
)

type PostgresInspector struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Enable extraction of connection metadata (user, database, application name) from
	// the startup message. This metadata is made available for access logging and stats.
	//
	// Defaults to “true“.
	EnableMetadataExtraction *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enable_metadata_extraction,json=enableMetadataExtraction,proto3" json:"enable_metadata_extraction,omitempty"`
	// The maximum size of the startup message that the postgres inspector will accept.
	// Messages larger than this will be rejected. If not specified, defaults to 10KB.
	//
	// PostgreSQL defines MAX_STARTUP_PACKET_LENGTH as 10KB.
	// Valid range is 256 bytes to 10KB.
	MaxStartupMessageSize *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_startup_message_size,json=maxStartupMessageSize,proto3" json:"max_startup_message_size,omitempty"`
	// Timeout for the inspector to receive and process the startup message.
	// The timeout starts when the connection is accepted by the listener.
	// If the timeout is reached before the startup message is fully received and processed,
	// the connection will be closed.
	//
	// If not specified, defaults to 10 seconds. Minimum is 1 second.
	StartupTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=startup_timeout,json=startupTimeout,proto3" json:"startup_timeout,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*PostgresInspector) ProtoMessage() {}

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

func (x *PostgresInspector) GetEnableMetadataExtraction() *wrapperspb.BoolValue {
	if x != nil {
		return x.EnableMetadataExtraction
	}
	return nil
}

func (x *PostgresInspector) GetMaxStartupMessageSize() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxStartupMessageSize
	}
	return nil
}

func (x *PostgresInspector) GetStartupTimeout() *durationpb.Duration {
	if x != nil {
		return x.StartupTimeout
	}
	return nil
}

// StartupMetadata stores connection attributes extracted from the PostgreSQL startup message.
// This is attached as typed dynamic metadata under the key “envoy.postgres_inspector“.
type StartupMetadata struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The username supplied in the startup message.
	User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// The database name supplied in the startup message. If not provided, it may default to the user name.
	Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"`
	// The application name supplied in the startup message.
	ApplicationName string `protobuf:"bytes,3,opt,name=application_name,json=applicationName,proto3" json:"application_name,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*StartupMetadata) ProtoMessage() {}

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

func (x *StartupMetadata) GetUser() string {
	if x != nil {
		return x.User
	}
	return ""
}

func (x *StartupMetadata) GetDatabase() string {
	if x != nil {
		return x.Database
	}
	return ""
}

func (x *StartupMetadata) GetApplicationName() string {
	if x != nil {
		return x.ApplicationName
	}
	return ""
}

var File_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto protoreflect.FileDescriptor

const file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDesc = "" +
	"\n" +
	"]contrib/envoy/extensions/filters/listener/postgres_inspector/v3alpha/postgres_inspector.proto\x12<envoy.extensions.filters.listener.postgres_inspector.v3alpha\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xa1\x02\n" +
	"\x11PostgresInspector\x12X\n" +
	"\x1aenable_metadata_extraction\x18\x01 \x01(\v2\x1a.google.protobuf.BoolValueR\x18enableMetadataExtraction\x12b\n" +
	"\x18max_startup_message_size\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueB\v\xfaB\b*\x06\x18\x90N(\x80\x02R\x15maxStartupMessageSize\x12N\n" +
	"\x0fstartup_timeout\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\n" +
	"\xfaB\a\xaa\x01\x042\x02\b\x01R\x0estartupTimeout\"l\n" +
	"\x0fStartupMetadata\x12\x12\n" +
	"\x04user\x18\x01 \x01(\tR\x04user\x12\x1a\n" +
	"\bdatabase\x18\x02 \x01(\tR\bdatabase\x12)\n" +
	"\x10application_name\x18\x03 \x01(\tR\x0fapplicationNameB\xdd\x01\xba\x80\xc8\xd1\x06\x04\b\x01\x10\x02\n" +
	"Jio.envoyproxy.envoy.extensions.filters.listener.postgres_inspector.v3alphaB\x16PostgresInspectorProtoP\x01Zkgithub.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/listener/postgres_inspector/v3alphab\x06proto3"

var (
	file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDescOnce sync.Once
	file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDescData []byte
)

func file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDescGZIP() []byte {
	file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDescOnce.Do(func() {
		file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDesc), len(file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDesc)))
	})
	return file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDescData
}

var file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_goTypes = []any{
	(*PostgresInspector)(nil),      // 0: envoy.extensions.filters.listener.postgres_inspector.v3alpha.PostgresInspector
	(*StartupMetadata)(nil),        // 1: envoy.extensions.filters.listener.postgres_inspector.v3alpha.StartupMetadata
	(*wrapperspb.BoolValue)(nil),   // 2: google.protobuf.BoolValue
	(*wrapperspb.UInt32Value)(nil), // 3: google.protobuf.UInt32Value
	(*durationpb.Duration)(nil),    // 4: google.protobuf.Duration
}
var file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.filters.listener.postgres_inspector.v3alpha.PostgresInspector.enable_metadata_extraction:type_name -> google.protobuf.BoolValue
	3, // 1: envoy.extensions.filters.listener.postgres_inspector.v3alpha.PostgresInspector.max_startup_message_size:type_name -> google.protobuf.UInt32Value
	4, // 2: envoy.extensions.filters.listener.postgres_inspector.v3alpha.PostgresInspector.startup_timeout:type_name -> google.protobuf.Duration
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() {
	file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_init()
}
func file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_init() {
	if File_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_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_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDesc), len(file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_goTypes,
		DependencyIndexes: file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_depIdxs,
		MessageInfos:      file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_msgTypes,
	}.Build()
	File_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto = out.File
	file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_goTypes = nil
	file_contrib_envoy_extensions_filters_listener_postgres_inspector_v3alpha_postgres_inspector_proto_depIdxs = nil
}
