// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto

package v2alpha

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

// Configuration for the dynamic forward proxy HTTP filter. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#extension: envoy.filters.http.dynamic_forward_proxy]
type FilterConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The DNS cache configuration that the filter will attach to. Note this configuration must
	// match that of associated :ref:`dynamic forward proxy cluster configuration
	// <envoy_api_field_config.cluster.dynamic_forward_proxy.v2alpha.ClusterConfig.dns_cache_config>`.
	DnsCacheConfig *v2alpha.DnsCacheConfig `protobuf:"bytes,1,opt,name=dns_cache_config,json=dnsCacheConfig,proto3" json:"dns_cache_config,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*FilterConfig) ProtoMessage() {}

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

func (x *FilterConfig) GetDnsCacheConfig() *v2alpha.DnsCacheConfig {
	if x != nil {
		return x.DnsCacheConfig
	}
	return nil
}

// Per route Configuration for the dynamic forward proxy HTTP filter.
type PerRouteConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to HostRewriteSpecifier:
	//
	//	*PerRouteConfig_HostRewrite
	//	*PerRouteConfig_AutoHostRewriteHeader
	HostRewriteSpecifier isPerRouteConfig_HostRewriteSpecifier `protobuf_oneof:"host_rewrite_specifier"`
	unknownFields        protoimpl.UnknownFields
	sizeCache            protoimpl.SizeCache
}

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

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

func (*PerRouteConfig) ProtoMessage() {}

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

func (x *PerRouteConfig) GetHostRewriteSpecifier() isPerRouteConfig_HostRewriteSpecifier {
	if x != nil {
		return x.HostRewriteSpecifier
	}
	return nil
}

func (x *PerRouteConfig) GetHostRewrite() string {
	if x != nil {
		if x, ok := x.HostRewriteSpecifier.(*PerRouteConfig_HostRewrite); ok {
			return x.HostRewrite
		}
	}
	return ""
}

func (x *PerRouteConfig) GetAutoHostRewriteHeader() string {
	if x != nil {
		if x, ok := x.HostRewriteSpecifier.(*PerRouteConfig_AutoHostRewriteHeader); ok {
			return x.AutoHostRewriteHeader
		}
	}
	return ""
}

type isPerRouteConfig_HostRewriteSpecifier interface {
	isPerRouteConfig_HostRewriteSpecifier()
}

type PerRouteConfig_HostRewrite struct {
	// Indicates that before DNS lookup, the host header will be swapped with
	// this value. If not set or empty, the original host header value
	// will be used and no rewrite will happen.
	//
	// Note: this rewrite affects both DNS lookup and host header forwarding. However, this
	// option shouldn't be used with
	// :ref:`HCM host rewrite <envoy_api_field_route.RouteAction.host_rewrite>` given that the
	// value set here would be used for DNS lookups whereas the value set in the HCM would be used
	// for host header forwarding which is not the desired outcome.
	HostRewrite string `protobuf:"bytes,1,opt,name=host_rewrite,json=hostRewrite,proto3,oneof"`
}

type PerRouteConfig_AutoHostRewriteHeader struct {
	// Indicates that before DNS lookup, the host header will be swapped with
	// the value of this header. If not set or empty, the original host header
	// value will be used and no rewrite will happen.
	//
	// Note: this rewrite affects both DNS lookup and host header forwarding. However, this
	// option shouldn't be used with
	// :ref:`HCM host rewrite header <envoy_api_field_route.RouteAction.auto_host_rewrite_header>`
	// given that the value set here would be used for DNS lookups whereas the value set in the HCM
	// would be used for host header forwarding which is not the desired outcome.
	//
	// .. note::
	//
	//	If the header appears multiple times only the first value is used.
	AutoHostRewriteHeader string `protobuf:"bytes,2,opt,name=auto_host_rewrite_header,json=autoHostRewriteHeader,proto3,oneof"`
}

func (*PerRouteConfig_HostRewrite) isPerRouteConfig_HostRewriteSpecifier() {}

func (*PerRouteConfig_AutoHostRewriteHeader) isPerRouteConfig_HostRewriteSpecifier() {}

var File_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto protoreflect.FileDescriptor

const file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDesc = "" +
	"\n" +
	"Renvoy/config/filter/http/dynamic_forward_proxy/v2alpha/dynamic_forward_proxy.proto\x126envoy.config.filter.http.dynamic_forward_proxy.v2alpha\x1aAenvoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\x85\x01\n" +
	"\fFilterConfig\x12u\n" +
	"\x10dns_cache_config\x18\x01 \x01(\v2A.envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfigB\b\xfaB\x05\x8a\x01\x02\x10\x01R\x0ednsCacheConfig\"\xc5\x01\n" +
	"\x0ePerRouteConfig\x12A\n" +
	"\fhost_rewrite\x18\x01 \x01(\tB\x1c\xf2\x98\xfe\x8f\x05\x16\n" +
	"\x14host_rewrite_literalH\x00R\vhostRewrite\x12V\n" +
	"\x18auto_host_rewrite_header\x18\x02 \x01(\tB\x1b\xf2\x98\xfe\x8f\x05\x15\n" +
	"\x13host_rewrite_headerH\x00R\x15autoHostRewriteHeaderB\x18\n" +
	"\x16host_rewrite_specifierB\x87\x02\xf2\x98\xfe\x8f\x058\x126envoy.extensions.filters.http.dynamic_forward_proxy.v3\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"Dio.envoyproxy.envoy.config.filter.http.dynamic_forward_proxy.v2alphaB\x18DynamicForwardProxyProtoP\x01Z]github.com/envoyproxy/go-control-plane/envoy/config/filter/http/dynamic_forward_proxy/v2alphab\x06proto3"

var (
	file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDescOnce sync.Once
	file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDescData []byte
)

func file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDescGZIP() []byte {
	file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDescOnce.Do(func() {
		file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDesc), len(file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDesc)))
	})
	return file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDescData
}

var file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_goTypes = []any{
	(*FilterConfig)(nil),           // 0: envoy.config.filter.http.dynamic_forward_proxy.v2alpha.FilterConfig
	(*PerRouteConfig)(nil),         // 1: envoy.config.filter.http.dynamic_forward_proxy.v2alpha.PerRouteConfig
	(*v2alpha.DnsCacheConfig)(nil), // 2: envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig
}
var file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_depIdxs = []int32{
	2, // 0: envoy.config.filter.http.dynamic_forward_proxy.v2alpha.FilterConfig.dns_cache_config:type_name -> envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() {
	file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_init()
}
func file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_init() {
	if File_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto != nil {
		return
	}
	file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_msgTypes[1].OneofWrappers = []any{
		(*PerRouteConfig_HostRewrite)(nil),
		(*PerRouteConfig_AutoHostRewriteHeader)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDesc), len(file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_goTypes,
		DependencyIndexes: file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_depIdxs,
		MessageInfos:      file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_msgTypes,
	}.Build()
	File_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto = out.File
	file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_goTypes = nil
	file_envoy_config_filter_http_dynamic_forward_proxy_v2alpha_dynamic_forward_proxy_proto_depIdxs = nil
}
