// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v7.35.1
// source: envoy/extensions/load_balancing_policies/override_host/v3/override_host.proto

package override_hostv3

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

// Configuration for the Override Host Load Balancing policy.
//
// This policy allows endpoint picking to be implemented in downstream HTTP filters. For example an ext_proc RPC to a service
// that implements k8s proposal for AI gateway inferences extensions
// https://github.com/kubernetes-sigs/gateway-api-inference-extension/tree/main/docs/proposals/004-endpoint-picker-protocol
// can provide hosts for serving a request using Override Host load balancing policy.
//
// This policy extracts selected override hosts from a list of “OverrideHostSource“ (request headers, metadata, etc.).
//
// The override host source must specify at least one host in “IP:Port“ format or multiple hosts in “IP:Port,IP:Port,...“
// format. For example “10.0.0.5:8080“ or “[2600:4040:5204::1574:24ae]:80“. The IPv6 address is enclosed in square brackets.
//
// For specific example, to support k8s gateway inference extensions, which uses the “x-gateway-destination-endpoint“
// header or metadata value under the "envoy.lb" key for selected hosts, the Override Host load balancing policy should be
// configured in the following way:
//
// .. code-block:: yaml
//
//	override_host_sources:
//	- header: "x-gateway-destination-endpoint"
//	- metadata:
//	    key: "envoy.lb"
//	    path:
//	    - key: "x-gateway-destination-endpoint"
//
// If no valid host in the override host list, then the specified fallback load balancing policy is used. This allows load
// balancing to degrade to a a built in policy (i.e. Round Robin) in case external endpoint picker fails.
//
// In addition to specifying “override_host_sources“, the policy can be configured to inform downstream filters
// of the selected endpoint through dynamic metadata or response headers through “selected_endpoint_key“:
//
// .. code-block:: yaml
//
//	override_host_sources:
//	- metadata:
//	    key: "envoy.lb"
//	    path:
//	    - key: "x-gateway-destination-endpoint"
//	selected_host_key:
//	  key: "envoy.lb"
//	  path:
//	  - key: "x-gateway-destination-endpoint-served"
//
// See the :ref:`load balancing architecture
// overview<arch_overview_load_balancing_types>` for more information.
type OverrideHost struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A list of sources to get host addresses from. The host sources are searched in the order
	// specified. The request is forwarded to the first address and subsequent addresses are used
	// for request retries or hedging.
	// Note that if an overridden host address is not present in the current endpoint set, it is
	// skipped and the next found address is used. If there are not enough overridden addresses to
	// satisfy all retry attempts the fallback load balancing policy is used to pick a host.
	OverrideHostSources []*OverrideHost_OverrideHostSource `protobuf:"bytes,1,rep,name=override_host_sources,json=overrideHostSources,proto3" json:"override_host_sources,omitempty"`
	// The metadata key to populate with the selected host address. This is optional and
	// may be used to inform downstream filters of the host address selected by load balancing policy.
	SelectedHostKey *v3.MetadataKey `protobuf:"bytes,2,opt,name=selected_host_key,json=selectedHostKey,proto3" json:"selected_host_key,omitempty"`
	// The child LB policy to use in case neither header nor metadata with selected
	// hosts is present.
	FallbackPolicy *v31.LoadBalancingPolicy `protobuf:"bytes,3,opt,name=fallback_policy,json=fallbackPolicy,proto3" json:"fallback_policy,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*OverrideHost) ProtoMessage() {}

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

func (x *OverrideHost) GetOverrideHostSources() []*OverrideHost_OverrideHostSource {
	if x != nil {
		return x.OverrideHostSources
	}
	return nil
}

func (x *OverrideHost) GetSelectedHostKey() *v3.MetadataKey {
	if x != nil {
		return x.SelectedHostKey
	}
	return nil
}

func (x *OverrideHost) GetFallbackPolicy() *v31.LoadBalancingPolicy {
	if x != nil {
		return x.FallbackPolicy
	}
	return nil
}

type OverrideHost_OverrideHostSource struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The header to get the override host addresses.
	//
	// Only one of the header or metadata field could be set.
	Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// The metadata key to get the override host addresses from the request dynamic metadata. If
	// set this field then it will take precedence over the header field.
	//
	// Only one of the header or metadata field could be set.
	Metadata      *v3.MetadataKey `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*OverrideHost_OverrideHostSource) ProtoMessage() {}

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

func (x *OverrideHost_OverrideHostSource) GetHeader() string {
	if x != nil {
		return x.Header
	}
	return ""
}

func (x *OverrideHost_OverrideHostSource) GetMetadata() *v3.MetadataKey {
	if x != nil {
		return x.Metadata
	}
	return nil
}

var File_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto protoreflect.FileDescriptor

const file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDesc = "" +
	"\n" +
	"Menvoy/extensions/load_balancing_policies/override_host/v3/override_host.proto\x129envoy.extensions.load_balancing_policies.override_host.v3\x1a%envoy/config/cluster/v3/cluster.proto\x1a%envoy/type/metadata/v3/metadata.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xd7\x03\n" +
	"\fOverrideHost\x12\x98\x01\n" +
	"\x15override_host_sources\x18\x01 \x03(\v2Z.envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSourceB\b\xfaB\x05\x92\x01\x02\b\x01R\x13overrideHostSources\x12O\n" +
	"\x11selected_host_key\x18\x02 \x01(\v2#.envoy.type.metadata.v3.MetadataKeyR\x0fselectedHostKey\x12_\n" +
	"\x0ffallback_policy\x18\x03 \x01(\v2,.envoy.config.cluster.v3.LoadBalancingPolicyB\b\xfaB\x05\x8a\x01\x02\x10\x01R\x0efallbackPolicy\x1az\n" +
	"\x12OverrideHostSource\x12#\n" +
	"\x06header\x18\x01 \x01(\tB\v\xfaB\br\x06\xc8\x01\x00\xc0\x01\x02R\x06header\x12?\n" +
	"\bmetadata\x18\x02 \x01(\v2#.envoy.type.metadata.v3.MetadataKeyR\bmetadataB\xd8\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"Gio.envoyproxy.envoy.extensions.load_balancing_policies.override_host.v3B\x11OverrideHostProtoP\x01Zpgithub.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/override_host/v3;override_hostv3b\x06proto3"

var (
	file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDescOnce sync.Once
	file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDescData []byte
)

func file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDescGZIP() []byte {
	file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDesc), len(file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDesc)))
	})
	return file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDescData
}

var file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_goTypes = []any{
	(*OverrideHost)(nil),                    // 0: envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost
	(*OverrideHost_OverrideHostSource)(nil), // 1: envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource
	(*v3.MetadataKey)(nil),                  // 2: envoy.type.metadata.v3.MetadataKey
	(*v31.LoadBalancingPolicy)(nil),         // 3: envoy.config.cluster.v3.LoadBalancingPolicy
}
var file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.override_host_sources:type_name -> envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource
	2, // 1: envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.selected_host_key:type_name -> envoy.type.metadata.v3.MetadataKey
	3, // 2: envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.fallback_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy
	2, // 3: envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource.metadata:type_name -> envoy.type.metadata.v3.MetadataKey
	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_extensions_load_balancing_policies_override_host_v3_override_host_proto_init()
}
func file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_init() {
	if File_envoy_extensions_load_balancing_policies_override_host_v3_override_host_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_load_balancing_policies_override_host_v3_override_host_proto_rawDesc), len(file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_msgTypes,
	}.Build()
	File_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto = out.File
	file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_goTypes = nil
	file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_depIdxs = nil
}
