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

package corev3

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"
	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 ProxyProtocolPassThroughTLVs_PassTLVsMatchType int32

const (
	// Pass all TLVs.
	ProxyProtocolPassThroughTLVs_INCLUDE_ALL ProxyProtocolPassThroughTLVs_PassTLVsMatchType = 0
	// Pass specific TLVs defined in tlv_type.
	ProxyProtocolPassThroughTLVs_INCLUDE ProxyProtocolPassThroughTLVs_PassTLVsMatchType = 1
)

// Enum value maps for ProxyProtocolPassThroughTLVs_PassTLVsMatchType.
var (
	ProxyProtocolPassThroughTLVs_PassTLVsMatchType_name = map[int32]string{
		0: "INCLUDE_ALL",
		1: "INCLUDE",
	}
	ProxyProtocolPassThroughTLVs_PassTLVsMatchType_value = map[string]int32{
		"INCLUDE_ALL": 0,
		"INCLUDE":     1,
	}
)

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

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

func (ProxyProtocolPassThroughTLVs_PassTLVsMatchType) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[0].Descriptor()
}

func (ProxyProtocolPassThroughTLVs_PassTLVsMatchType) Type() protoreflect.EnumType {
	return &file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[0]
}

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

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

type ProxyProtocolConfig_Version int32

const (
	// PROXY protocol version 1. Human readable format.
	ProxyProtocolConfig_V1 ProxyProtocolConfig_Version = 0
	// PROXY protocol version 2. Binary format.
	ProxyProtocolConfig_V2 ProxyProtocolConfig_Version = 1
)

// Enum value maps for ProxyProtocolConfig_Version.
var (
	ProxyProtocolConfig_Version_name = map[int32]string{
		0: "V1",
		1: "V2",
	}
	ProxyProtocolConfig_Version_value = map[string]int32{
		"V1": 0,
		"V2": 1,
	}
)

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

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

func (ProxyProtocolConfig_Version) Descriptor() protoreflect.EnumDescriptor {
	return file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[1].Descriptor()
}

func (ProxyProtocolConfig_Version) Type() protoreflect.EnumType {
	return &file_envoy_config_core_v3_proxy_protocol_proto_enumTypes[1]
}

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

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

type ProxyProtocolPassThroughTLVs struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The strategy to pass through TLVs. Default is INCLUDE_ALL.
	// If INCLUDE_ALL is set, all TLVs will be passed through no matter the tlv_type field.
	MatchType ProxyProtocolPassThroughTLVs_PassTLVsMatchType `protobuf:"varint,1,opt,name=match_type,json=matchType,proto3,enum=envoy.config.core.v3.ProxyProtocolPassThroughTLVs_PassTLVsMatchType" json:"match_type,omitempty"`
	// The TLV types that are applied based on match_type.
	// 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,2,rep,packed,name=tlv_type,json=tlvType,proto3" json:"tlv_type,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProxyProtocolPassThroughTLVs) ProtoMessage() {}

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

func (x *ProxyProtocolPassThroughTLVs) GetMatchType() ProxyProtocolPassThroughTLVs_PassTLVsMatchType {
	if x != nil {
		return x.MatchType
	}
	return ProxyProtocolPassThroughTLVs_INCLUDE_ALL
}

func (x *ProxyProtocolPassThroughTLVs) GetTlvType() []uint32 {
	if x != nil {
		return x.TlvType
	}
	return nil
}

// Represents a single Type-Length-Value (TLV) entry.
type TlvEntry struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The type of the TLV. Must be a uint8 (0-255) as per the Proxy Protocol v2 specification.
	Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	// The static value of the TLV.
	// Only one of “value“ or “format_string“ may be set.
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// Uses the :ref:`format string <config_access_log_format_strings>` to dynamically
	// populate the TLV value from stream information. This allows dynamic values
	// such as metadata, filter state, or other stream properties to be included in
	// the TLV.
	//
	// For example:
	//
	// .. code-block:: yaml
	//
	//	type: 0xF0
	//	format_string:
	//	  text_format_source:
	//	    inline_string: "%DYNAMIC_METADATA(envoy.filters.network:key)%"
	//
	// The formatted string will be used directly as the TLV value.
	// Only one of “value“ or “format_string“ may be set.
	FormatString  *SubstitutionFormatString `protobuf:"bytes,3,opt,name=format_string,json=formatString,proto3" json:"format_string,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*TlvEntry) ProtoMessage() {}

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

func (x *TlvEntry) GetType() uint32 {
	if x != nil {
		return x.Type
	}
	return 0
}

func (x *TlvEntry) GetValue() []byte {
	if x != nil {
		return x.Value
	}
	return nil
}

func (x *TlvEntry) GetFormatString() *SubstitutionFormatString {
	if x != nil {
		return x.FormatString
	}
	return nil
}

type ProxyProtocolConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The PROXY protocol version to use. See https://www.haproxy.org/download/2.1/doc/proxy-protocol.txt for details
	Version ProxyProtocolConfig_Version `protobuf:"varint,1,opt,name=version,proto3,enum=envoy.config.core.v3.ProxyProtocolConfig_Version" json:"version,omitempty"`
	// This config controls which TLVs can be passed to upstream if it is Proxy Protocol
	// V2 header. If there is no setting for this field, no TLVs will be passed through.
	PassThroughTlvs *ProxyProtocolPassThroughTLVs `protobuf:"bytes,2,opt,name=pass_through_tlvs,json=passThroughTlvs,proto3" json:"pass_through_tlvs,omitempty"`
	// This config allows additional TLVs to be included in the upstream PROXY protocol
	// V2 header. Unlike “pass_through_tlvs“, which passes TLVs from the downstream request,
	// “added_tlvs“ provides an extension mechanism for defining new TLVs that are included
	// with the upstream request. These TLVs may not be present in the downstream request and
	// can be defined at either the transport socket level or the host level to provide more
	// granular control over the TLVs that are included in the upstream request.
	//
	// Host-level TLVs are specified in the “metadata.typed_filter_metadata“ field under the
	// “envoy.transport_sockets.proxy_protocol“ namespace.
	//
	// .. literalinclude:: /_configs/repo/proxy_protocol.yaml
	//
	//	:language: yaml
	//	:lines: 49-57
	//	:linenos:
	//	:lineno-start: 49
	//	:caption: :download:`proxy_protocol.yaml </_configs/repo/proxy_protocol.yaml>`
	//
	// **Precedence behavior**:
	//
	//   - When a TLV is defined at both the host level and the transport socket level, the value
	//     from the host level configuration takes precedence. This allows users to define default TLVs
	//     at the transport socket level and override them at the host level.
	//   - Any TLV defined in the “pass_through_tlvs“ field will be overridden by either the host-level
	//     or transport socket-level TLV.
	//
	// If there are multiple TLVs with the same type, only the TLVs from the highest precedence level
	// will be used.
	AddedTlvs     []*TlvEntry `protobuf:"bytes,3,rep,name=added_tlvs,json=addedTlvs,proto3" json:"added_tlvs,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ProxyProtocolConfig) ProtoMessage() {}

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

func (x *ProxyProtocolConfig) GetVersion() ProxyProtocolConfig_Version {
	if x != nil {
		return x.Version
	}
	return ProxyProtocolConfig_V1
}

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

func (x *ProxyProtocolConfig) GetAddedTlvs() []*TlvEntry {
	if x != nil {
		return x.AddedTlvs
	}
	return nil
}

type PerHostConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Enables per-host configuration for Proxy Protocol.
	AddedTlvs     []*TlvEntry `protobuf:"bytes,1,rep,name=added_tlvs,json=addedTlvs,proto3" json:"added_tlvs,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PerHostConfig) Reset() {
	*x = PerHostConfig{}
	mi := &file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*PerHostConfig) ProtoMessage() {}

func (x *PerHostConfig) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_config_core_v3_proxy_protocol_proto_msgTypes[3]
	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 PerHostConfig.ProtoReflect.Descriptor instead.
func (*PerHostConfig) Descriptor() ([]byte, []int) {
	return file_envoy_config_core_v3_proxy_protocol_proto_rawDescGZIP(), []int{3}
}

func (x *PerHostConfig) GetAddedTlvs() []*TlvEntry {
	if x != nil {
		return x.AddedTlvs
	}
	return nil
}

var File_envoy_config_core_v3_proxy_protocol_proto protoreflect.FileDescriptor

const file_envoy_config_core_v3_proxy_protocol_proto_rawDesc = "" +
	"\n" +
	")envoy/config/core/v3/proxy_protocol.proto\x12\x14envoy.config.core.v3\x1a5envoy/config/core/v3/substitution_format_string.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xe0\x01\n" +
	"\x1cProxyProtocolPassThroughTLVs\x12c\n" +
	"\n" +
	"match_type\x18\x01 \x01(\x0e2D.envoy.config.core.v3.ProxyProtocolPassThroughTLVs.PassTLVsMatchTypeR\tmatchType\x12(\n" +
	"\btlv_type\x18\x02 \x03(\rB\r\xfaB\n" +
	"\x92\x01\a\"\x05*\x03\x10\x80\x02R\atlvType\"1\n" +
	"\x11PassTLVsMatchType\x12\x0f\n" +
	"\vINCLUDE_ALL\x10\x00\x12\v\n" +
	"\aINCLUDE\x10\x01\"\x93\x01\n" +
	"\bTlvEntry\x12\x1c\n" +
	"\x04type\x18\x01 \x01(\rB\b\xfaB\x05*\x03\x10\x80\x02R\x04type\x12\x14\n" +
	"\x05value\x18\x02 \x01(\fR\x05value\x12S\n" +
	"\rformat_string\x18\x03 \x01(\v2..envoy.config.core.v3.SubstitutionFormatStringR\fformatString\"\x9c\x02\n" +
	"\x13ProxyProtocolConfig\x12K\n" +
	"\aversion\x18\x01 \x01(\x0e21.envoy.config.core.v3.ProxyProtocolConfig.VersionR\aversion\x12^\n" +
	"\x11pass_through_tlvs\x18\x02 \x01(\v22.envoy.config.core.v3.ProxyProtocolPassThroughTLVsR\x0fpassThroughTlvs\x12=\n" +
	"\n" +
	"added_tlvs\x18\x03 \x03(\v2\x1e.envoy.config.core.v3.TlvEntryR\taddedTlvs\"\x19\n" +
	"\aVersion\x12\x06\n" +
	"\x02V1\x10\x00\x12\x06\n" +
	"\x02V2\x10\x01\"N\n" +
	"\rPerHostConfig\x12=\n" +
	"\n" +
	"added_tlvs\x18\x01 \x03(\v2\x1e.envoy.config.core.v3.TlvEntryR\taddedTlvsB\x86\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"\"io.envoyproxy.envoy.config.core.v3B\x12ProxyProtocolProtoP\x01ZBgithub.com/envoyproxy/go-control-plane/envoy/config/core/v3;corev3b\x06proto3"

var (
	file_envoy_config_core_v3_proxy_protocol_proto_rawDescOnce sync.Once
	file_envoy_config_core_v3_proxy_protocol_proto_rawDescData []byte
)

func file_envoy_config_core_v3_proxy_protocol_proto_rawDescGZIP() []byte {
	file_envoy_config_core_v3_proxy_protocol_proto_rawDescOnce.Do(func() {
		file_envoy_config_core_v3_proxy_protocol_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_core_v3_proxy_protocol_proto_rawDesc), len(file_envoy_config_core_v3_proxy_protocol_proto_rawDesc)))
	})
	return file_envoy_config_core_v3_proxy_protocol_proto_rawDescData
}

var file_envoy_config_core_v3_proxy_protocol_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_envoy_config_core_v3_proxy_protocol_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_envoy_config_core_v3_proxy_protocol_proto_goTypes = []any{
	(ProxyProtocolPassThroughTLVs_PassTLVsMatchType)(0), // 0: envoy.config.core.v3.ProxyProtocolPassThroughTLVs.PassTLVsMatchType
	(ProxyProtocolConfig_Version)(0),                    // 1: envoy.config.core.v3.ProxyProtocolConfig.Version
	(*ProxyProtocolPassThroughTLVs)(nil),                // 2: envoy.config.core.v3.ProxyProtocolPassThroughTLVs
	(*TlvEntry)(nil),                                    // 3: envoy.config.core.v3.TlvEntry
	(*ProxyProtocolConfig)(nil),                         // 4: envoy.config.core.v3.ProxyProtocolConfig
	(*PerHostConfig)(nil),                               // 5: envoy.config.core.v3.PerHostConfig
	(*SubstitutionFormatString)(nil),                    // 6: envoy.config.core.v3.SubstitutionFormatString
}
var file_envoy_config_core_v3_proxy_protocol_proto_depIdxs = []int32{
	0, // 0: envoy.config.core.v3.ProxyProtocolPassThroughTLVs.match_type:type_name -> envoy.config.core.v3.ProxyProtocolPassThroughTLVs.PassTLVsMatchType
	6, // 1: envoy.config.core.v3.TlvEntry.format_string:type_name -> envoy.config.core.v3.SubstitutionFormatString
	1, // 2: envoy.config.core.v3.ProxyProtocolConfig.version:type_name -> envoy.config.core.v3.ProxyProtocolConfig.Version
	2, // 3: envoy.config.core.v3.ProxyProtocolConfig.pass_through_tlvs:type_name -> envoy.config.core.v3.ProxyProtocolPassThroughTLVs
	3, // 4: envoy.config.core.v3.ProxyProtocolConfig.added_tlvs:type_name -> envoy.config.core.v3.TlvEntry
	3, // 5: envoy.config.core.v3.PerHostConfig.added_tlvs:type_name -> envoy.config.core.v3.TlvEntry
	6, // [6:6] is the sub-list for method output_type
	6, // [6:6] is the sub-list for method input_type
	6, // [6:6] is the sub-list for extension type_name
	6, // [6:6] is the sub-list for extension extendee
	0, // [0:6] is the sub-list for field type_name
}

func init() { file_envoy_config_core_v3_proxy_protocol_proto_init() }
func file_envoy_config_core_v3_proxy_protocol_proto_init() {
	if File_envoy_config_core_v3_proxy_protocol_proto != nil {
		return
	}
	file_envoy_config_core_v3_substitution_format_string_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_config_core_v3_proxy_protocol_proto_rawDesc), len(file_envoy_config_core_v3_proxy_protocol_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_core_v3_proxy_protocol_proto_goTypes,
		DependencyIndexes: file_envoy_config_core_v3_proxy_protocol_proto_depIdxs,
		EnumInfos:         file_envoy_config_core_v3_proxy_protocol_proto_enumTypes,
		MessageInfos:      file_envoy_config_core_v3_proxy_protocol_proto_msgTypes,
	}.Build()
	File_envoy_config_core_v3_proxy_protocol_proto = out.File
	file_envoy_config_core_v3_proxy_protocol_proto_goTypes = nil
	file_envoy_config_core_v3_proxy_protocol_proto_depIdxs = nil
}
