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

package proxy_protocolv3

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"
	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)
)

// Controls where TLV values are stored when rules match.
type ProxyProtocol_TlvLocation int32

const (
	// Store TLV values in dynamic metadata.
	ProxyProtocol_DYNAMIC_METADATA ProxyProtocol_TlvLocation = 0
	// Store TLV values in filter state as a single map-like object.
	ProxyProtocol_FILTER_STATE ProxyProtocol_TlvLocation = 1
)

// Enum value maps for ProxyProtocol_TlvLocation.
var (
	ProxyProtocol_TlvLocation_name = map[int32]string{
		0: "DYNAMIC_METADATA",
		1: "FILTER_STATE",
	}
	ProxyProtocol_TlvLocation_value = map[string]int32{
		"DYNAMIC_METADATA": 0,
		"FILTER_STATE":     1,
	}
)

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

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

func (ProxyProtocol_TlvLocation) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_enumTypes[0].Descriptor()
}

func (ProxyProtocol_TlvLocation) Type() protoreflect.EnumType {
	return &file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_enumTypes[0]
}

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

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

// [#next-free-field: 7]
type ProxyProtocol struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The list of rules to apply to requests.
	Rules []*ProxyProtocol_Rule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
	// Allow requests through that don't use proxy protocol. Defaults to false.
	//
	// .. attention::
	//
	//	This breaks conformance with the specification.
	//	Only enable if ALL traffic to the listener comes from a trusted source.
	//	For more information on the security implications of this feature, see
	//	https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt
	//
	// .. attention::
	//
	//	Requests of 12 or fewer bytes that match the proxy protocol v2 signature
	//	and requests of 6 or fewer bytes that match the proxy protocol v1
	//	signature will timeout (Envoy is unable to differentiate these requests
	//	from incomplete proxy protocol requests).
	AllowRequestsWithoutProxyProtocol bool `protobuf:"varint,2,opt,name=allow_requests_without_proxy_protocol,json=allowRequestsWithoutProxyProtocol,proto3" json:"allow_requests_without_proxy_protocol,omitempty"`
	// This config controls which TLVs can be passed to filter state if it is Proxy Protocol
	// V2 header. If there is no setting for this field, no TLVs will be passed through.
	//
	// .. note::
	//
	//	If this is configured, you likely also want to set
	//	:ref:`core.v3.ProxyProtocolConfig.pass_through_tlvs <envoy_v3_api_field_config.core.v3.ProxyProtocolConfig.pass_through_tlvs>`,
	//	which controls pass-through for the upstream.
	PassThroughTlvs *v3.ProxyProtocolPassThroughTLVs `protobuf:"bytes,3,opt,name=pass_through_tlvs,json=passThroughTlvs,proto3" json:"pass_through_tlvs,omitempty"`
	// The PROXY protocol versions that won't be matched. Useful to limit the scope and attack surface of the filter.
	//
	// When the filter receives PROXY protocol data that is disallowed, it will reject the connection.
	// By default, the filter will match all PROXY protocol versions.
	// See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details.
	//
	// .. attention::
	//
	//	When used in conjunction with the :ref:`allow_requests_without_proxy_protocol <envoy_v3_api_field_extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.allow_requests_without_proxy_protocol>`,
	//	the filter will not attempt to match signatures for the disallowed versions.
	//	For example, when ``disallowed_versions=V2``, ``allow_requests_without_proxy_protocol=true``,
	//	and an incoming request matches the V2 signature, the filter will allow the request through without any modification.
	//	The filter treats this request as if it did not have any PROXY protocol information.
	DisallowedVersions []v3.ProxyProtocolConfig_Version `protobuf:"varint,4,rep,packed,name=disallowed_versions,json=disallowedVersions,proto3,enum=envoy.config.core.v3.ProxyProtocolConfig_Version" json:"disallowed_versions,omitempty"`
	// The human readable prefix to use when emitting statistics for the filter.
	// If not configured, statistics will be emitted without the prefix segment.
	// See the :ref:`filter's statistics documentation <config_listener_filters_proxy_protocol>` for
	// more information.
	StatPrefix string `protobuf:"bytes,5,opt,name=stat_prefix,json=statPrefix,proto3" json:"stat_prefix,omitempty"`
	// Controls where TLV values are stored when rules match. Defaults to DYNAMIC_METADATA.
	TlvLocation   ProxyProtocol_TlvLocation `protobuf:"varint,6,opt,name=tlv_location,json=tlvLocation,proto3,enum=envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol_TlvLocation" json:"tlv_location,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProxyProtocol) ProtoMessage() {}

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

func (x *ProxyProtocol) GetRules() []*ProxyProtocol_Rule {
	if x != nil {
		return x.Rules
	}
	return nil
}

func (x *ProxyProtocol) GetAllowRequestsWithoutProxyProtocol() bool {
	if x != nil {
		return x.AllowRequestsWithoutProxyProtocol
	}
	return false
}

func (x *ProxyProtocol) GetPassThroughTlvs() *v3.ProxyProtocolPassThroughTLVs {
	if x != nil {
		return x.PassThroughTlvs
	}
	return nil
}

func (x *ProxyProtocol) GetDisallowedVersions() []v3.ProxyProtocolConfig_Version {
	if x != nil {
		return x.DisallowedVersions
	}
	return nil
}

func (x *ProxyProtocol) GetStatPrefix() string {
	if x != nil {
		return x.StatPrefix
	}
	return ""
}

func (x *ProxyProtocol) GetTlvLocation() ProxyProtocol_TlvLocation {
	if x != nil {
		return x.TlvLocation
	}
	return ProxyProtocol_DYNAMIC_METADATA
}

type ProxyProtocol_KeyValuePair struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The namespace — if this is empty, the filter's namespace will be used.
	MetadataNamespace string `protobuf:"bytes,1,opt,name=metadata_namespace,json=metadataNamespace,proto3" json:"metadata_namespace,omitempty"`
	// The key to use within the namespace.
	Key           string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProxyProtocol_KeyValuePair) ProtoMessage() {}

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

func (x *ProxyProtocol_KeyValuePair) GetMetadataNamespace() string {
	if x != nil {
		return x.MetadataNamespace
	}
	return ""
}

func (x *ProxyProtocol_KeyValuePair) GetKey() string {
	if x != nil {
		return x.Key
	}
	return ""
}

// A Rule defines what metadata to apply when a header is present or missing.
type ProxyProtocol_Rule struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The type that triggers the rule - required
	// TLV type is defined as uint8_t in proxy protocol. See `the spec
	// <https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt>`_ for details.
	TlvType uint32 `protobuf:"varint,1,opt,name=tlv_type,json=tlvType,proto3" json:"tlv_type,omitempty"`
	// If the TLV type is present, apply this metadata KeyValuePair.
	OnTlvPresent  *ProxyProtocol_KeyValuePair `protobuf:"bytes,2,opt,name=on_tlv_present,json=onTlvPresent,proto3" json:"on_tlv_present,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProxyProtocol_Rule) ProtoMessage() {}

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

func (x *ProxyProtocol_Rule) GetTlvType() uint32 {
	if x != nil {
		return x.TlvType
	}
	return 0
}

func (x *ProxyProtocol_Rule) GetOnTlvPresent() *ProxyProtocol_KeyValuePair {
	if x != nil {
		return x.OnTlvPresent
	}
	return nil
}

var File_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc = "" +
	"\n" +
	"Henvoy/extensions/filters/listener/proxy_protocol/v3/proxy_protocol.proto\x123envoy.extensions.filters.listener.proxy_protocol.v3\x1a)envoy/config/core/v3/proxy_protocol.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\x93\a\n" +
	"\rProxyProtocol\x12]\n" +
	"\x05rules\x18\x01 \x03(\v2G.envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.RuleR\x05rules\x12P\n" +
	"%allow_requests_without_proxy_protocol\x18\x02 \x01(\bR!allowRequestsWithoutProxyProtocol\x12^\n" +
	"\x11pass_through_tlvs\x18\x03 \x01(\v22.envoy.config.core.v3.ProxyProtocolPassThroughTLVsR\x0fpassThroughTlvs\x12b\n" +
	"\x13disallowed_versions\x18\x04 \x03(\x0e21.envoy.config.core.v3.ProxyProtocolConfig.VersionR\x12disallowedVersions\x12\x1f\n" +
	"\vstat_prefix\x18\x05 \x01(\tR\n" +
	"statPrefix\x12q\n" +
	"\ftlv_location\x18\x06 \x01(\x0e2N.envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.TlvLocationR\vtlvLocation\x1aX\n" +
	"\fKeyValuePair\x12-\n" +
	"\x12metadata_namespace\x18\x01 \x01(\tR\x11metadataNamespace\x12\x19\n" +
	"\x03key\x18\x02 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x03key\x1a\xa2\x01\n" +
	"\x04Rule\x12#\n" +
	"\btlv_type\x18\x01 \x01(\rB\b\xfaB\x05*\x03\x10\x80\x02R\atlvType\x12u\n" +
	"\x0eon_tlv_present\x18\x02 \x01(\v2O.envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.KeyValuePairR\fonTlvPresent\"5\n" +
	"\vTlvLocation\x12\x14\n" +
	"\x10DYNAMIC_METADATA\x10\x00\x12\x10\n" +
	"\fFILTER_STATE\x10\x01:C\x9aň\x1e>\n" +
	"<envoy.config.filter.listener.proxy_protocol.v2.ProxyProtocolB\xce\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"Aio.envoyproxy.envoy.extensions.filters.listener.proxy_protocol.v3B\x12ProxyProtocolProtoP\x01Zkgithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/listener/proxy_protocol/v3;proxy_protocolv3b\x06proto3"

var (
	file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescData []byte
)

func file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc), len(file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDescData
}

var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_goTypes = []any{
	(ProxyProtocol_TlvLocation)(0),          // 0: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.TlvLocation
	(*ProxyProtocol)(nil),                   // 1: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol
	(*ProxyProtocol_KeyValuePair)(nil),      // 2: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.KeyValuePair
	(*ProxyProtocol_Rule)(nil),              // 3: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.Rule
	(*v3.ProxyProtocolPassThroughTLVs)(nil), // 4: envoy.config.core.v3.ProxyProtocolPassThroughTLVs
	(v3.ProxyProtocolConfig_Version)(0),     // 5: envoy.config.core.v3.ProxyProtocolConfig.Version
}
var file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_depIdxs = []int32{
	3, // 0: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.rules:type_name -> envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.Rule
	4, // 1: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.pass_through_tlvs:type_name -> envoy.config.core.v3.ProxyProtocolPassThroughTLVs
	5, // 2: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.disallowed_versions:type_name -> envoy.config.core.v3.ProxyProtocolConfig.Version
	0, // 3: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.tlv_location:type_name -> envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.TlvLocation
	2, // 4: envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.Rule.on_tlv_present:type_name -> envoy.extensions.filters.listener.proxy_protocol.v3.ProxyProtocol.KeyValuePair
	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_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_init() }
func file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_init() {
	if File_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc), len(file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_depIdxs,
		EnumInfos:         file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_enumTypes,
		MessageInfos:      file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto = out.File
	file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_goTypes = nil
	file_envoy_extensions_filters_listener_proxy_protocol_v3_proxy_protocol_proto_depIdxs = nil
}
