// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.30.0
// 	protoc        v5.29.3
// source: envoy/extensions/load_balancing_policies/override_host/v3/override_host.proto

package override_hostv3

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

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.
//
// See the :ref:`load balancing architecture
// overview<arch_overview_load_balancing_types>` for more information.
type OverrideHost struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// 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 child LB policy to use in case neither header nor metadata with selected
	// hosts is present.
	FallbackPolicy *v3.LoadBalancingPolicy `protobuf:"bytes,3,opt,name=fallback_policy,json=fallbackPolicy,proto3" json:"fallback_policy,omitempty"`
}

func (x *OverrideHost) Reset() {
	*x = OverrideHost{}
	if protoimpl.UnsafeEnabled {
		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 protoimpl.UnsafeEnabled && 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) GetFallbackPolicy() *v3.LoadBalancingPolicy {
	if x != nil {
		return x.FallbackPolicy
	}
	return nil
}

type OverrideHost_OverrideHostSource struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// 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 *v31.MetadataKey `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
}

func (x *OverrideHost_OverrideHostSource) Reset() {
	*x = OverrideHost_OverrideHostSource{}
	if protoimpl.UnsafeEnabled {
		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 protoimpl.UnsafeEnabled && 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() *v31.MetadataKey {
	if x != nil {
		return x.Metadata
	}
	return nil
}

var File_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto protoreflect.FileDescriptor

var file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDesc = []byte{
	0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
	0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
	0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72,
	0x69, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x76, 0x65, 0x72,
	0x72, 0x69, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
	0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
	0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67,
	0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69,
	0x64, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f,
	0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
	0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
	0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65,
	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
	0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75,
	0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
	0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
	0x22, 0x86, 0x03, 0x0a, 0x0c, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x48, 0x6f, 0x73,
	0x74, 0x12, 0x98, 0x01, 0x0a, 0x15, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x68,
	0x6f, 0x73, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
	0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
	0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63,
	0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x6f, 0x76, 0x65,
	0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x76,
	0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72,
	0x69, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa,
	0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64,
	0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x5f, 0x0a, 0x0f,
	0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18,
	0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f,
	0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
	0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f, 0x6c,
	0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x66,
	0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x7a, 0x0a,
	0x12, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75,
	0x72, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
	0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc8, 0x01, 0x00, 0xc0, 0x01, 0x02,
	0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61,
	0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76,
	0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
	0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x52,
	0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xd8, 0x01, 0xba, 0x80, 0xc8, 0xd1,
	0x06, 0x02, 0x10, 0x02, 0x0a, 0x47, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,
	0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
	0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63,
	0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x6f, 0x76, 0x65,
	0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x4f,
	0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
	0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65,
	0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e,
	0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79,
	0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64,
	0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
	0x69, 0x65, 0x73, 0x2f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x68, 0x6f, 0x73,
	0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x68, 0x6f,
	0x73, 0x74, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

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 = file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDesc
)

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(file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_rawDescData)
	})
	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 = []interface{}{
	(*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.LoadBalancingPolicy)(nil),          // 2: envoy.config.cluster.v3.LoadBalancingPolicy
	(*v31.MetadataKey)(nil),                 // 3: envoy.type.metadata.v3.MetadataKey
}
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.fallback_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy
	3, // 2: envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource.metadata:type_name -> envoy.type.metadata.v3.MetadataKey
	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_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
	}
	if !protoimpl.UnsafeEnabled {
		file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OverrideHost); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
		file_envoy_extensions_load_balancing_policies_override_host_v3_override_host_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*OverrideHost_OverrideHostSource); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: 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_rawDesc = nil
	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
}
