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

package endpointv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	durationpb "google.golang.org/protobuf/types/known/durationpb"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	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)
)

// Each route from RDS will map to a single cluster or traffic split across
// clusters using weights expressed in the RDS WeightedCluster.
//
// With EDS, each cluster is treated independently from a LB perspective, with
// LB taking place between the Localities within a cluster and at a finer
// granularity between the hosts within a locality. The percentage of traffic
// for each endpoint is determined by both its load_balancing_weight, and the
// load_balancing_weight of its locality. First, a locality will be selected,
// then an endpoint within that locality will be chose based on its weight.
// [#next-free-field: 6]
type ClusterLoadAssignment struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the cluster. This will be the :ref:`service_name
	// <envoy_v3_api_field_config.cluster.v3.Cluster.EdsClusterConfig.service_name>` value if specified
	// in the cluster :ref:`EdsClusterConfig
	// <envoy_v3_api_msg_config.cluster.v3.Cluster.EdsClusterConfig>`.
	ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	// List of endpoints to load balance to.
	Endpoints []*LocalityLbEndpoints `protobuf:"bytes,2,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
	// Map of named endpoints that can be referenced in LocalityLbEndpoints.
	// [#not-implemented-hide:]
	NamedEndpoints map[string]*Endpoint `protobuf:"bytes,5,rep,name=named_endpoints,json=namedEndpoints,proto3" json:"named_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
	// Load balancing policy settings.
	Policy        *ClusterLoadAssignment_Policy `protobuf:"bytes,4,opt,name=policy,proto3" json:"policy,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ClusterLoadAssignment) ProtoMessage() {}

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

func (x *ClusterLoadAssignment) GetClusterName() string {
	if x != nil {
		return x.ClusterName
	}
	return ""
}

func (x *ClusterLoadAssignment) GetEndpoints() []*LocalityLbEndpoints {
	if x != nil {
		return x.Endpoints
	}
	return nil
}

func (x *ClusterLoadAssignment) GetNamedEndpoints() map[string]*Endpoint {
	if x != nil {
		return x.NamedEndpoints
	}
	return nil
}

func (x *ClusterLoadAssignment) GetPolicy() *ClusterLoadAssignment_Policy {
	if x != nil {
		return x.Policy
	}
	return nil
}

// Load balancing policy settings.
// [#next-free-field: 7]
type ClusterLoadAssignment_Policy struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Action to trim the overall incoming traffic to protect the upstream
	// hosts. This action allows protection in case the hosts are unable to
	// recover from an outage, or unable to autoscale or unable to handle
	// incoming traffic volume for any reason.
	//
	// At the client each category is applied one after the other to generate
	// the 'actual' drop percentage on all outgoing traffic. For example:
	//
	// .. code-block:: json
	//
	//	{ "drop_overloads": [
	//	    { "category": "throttle", "drop_percentage": 60 }
	//	    { "category": "lb", "drop_percentage": 50 }
	//	]}
	//
	// The actual drop percentages applied to the traffic at the clients will be
	//
	//	"throttle"_drop = 60%
	//	"lb"_drop = 20%  // 50% of the remaining 'actual' load, which is 40%.
	//	actual_outgoing_load = 20% // remaining after applying all categories.
	//
	// Envoy supports only one element and will NACK if more than one element is present.
	// Other xDS-capable data planes will not necessarily have this limitation.
	//
	// In Envoy, this “drop_overloads“ config can be overridden by a runtime key
	// "load_balancing_policy.drop_overload_limit" setting. This runtime key can be set to
	// any integer number between 0 and 100. 0 means drop 0%. 100 means drop 100%.
	// When both “drop_overloads“ config and "load_balancing_policy.drop_overload_limit"
	// setting are in place, the min of these two wins.
	DropOverloads []*ClusterLoadAssignment_Policy_DropOverload `protobuf:"bytes,2,rep,name=drop_overloads,json=dropOverloads,proto3" json:"drop_overloads,omitempty"`
	// Priority levels and localities are considered overprovisioned with this
	// factor (in percentage). This means that we don't consider a priority
	// level or locality unhealthy until the fraction of healthy hosts
	// multiplied by the overprovisioning factor drops below 100.
	// With the default value 140(1.4), Envoy doesn't consider a priority level
	// or a locality unhealthy until their percentage of healthy hosts drops
	// below 72%. For example:
	//
	// .. code-block:: json
	//
	//	{ "overprovisioning_factor": 100 }
	//
	// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
	// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
	OverprovisioningFactor *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=overprovisioning_factor,json=overprovisioningFactor,proto3" json:"overprovisioning_factor,omitempty"`
	// The max time until which the endpoints from this assignment can be used.
	// If no new assignments are received before this time expires the endpoints
	// are considered stale and should be marked unhealthy.
	// Defaults to 0 which means endpoints never go stale.
	EndpointStaleAfter *durationpb.Duration `protobuf:"bytes,4,opt,name=endpoint_stale_after,json=endpointStaleAfter,proto3" json:"endpoint_stale_after,omitempty"`
	// If true, use the :ref:`load balancing weight
	// <envoy_v3_api_field_config.endpoint.v3.LbEndpoint.load_balancing_weight>` of healthy and unhealthy
	// hosts to determine the health of the priority level. If false, use the number of healthy and unhealthy hosts
	// to determine the health of the priority level, or in other words assume each host has a weight of 1 for
	// this calculation.
	//
	// .. note::
	//
	//	This is not currently implemented for
	//	:ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
	WeightedPriorityHealth bool `protobuf:"varint,6,opt,name=weighted_priority_health,json=weightedPriorityHealth,proto3" json:"weighted_priority_health,omitempty"`
	unknownFields          protoimpl.UnknownFields
	sizeCache              protoimpl.SizeCache
}

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

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

func (*ClusterLoadAssignment_Policy) ProtoMessage() {}

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

func (x *ClusterLoadAssignment_Policy) GetDropOverloads() []*ClusterLoadAssignment_Policy_DropOverload {
	if x != nil {
		return x.DropOverloads
	}
	return nil
}

func (x *ClusterLoadAssignment_Policy) GetOverprovisioningFactor() *wrapperspb.UInt32Value {
	if x != nil {
		return x.OverprovisioningFactor
	}
	return nil
}

func (x *ClusterLoadAssignment_Policy) GetEndpointStaleAfter() *durationpb.Duration {
	if x != nil {
		return x.EndpointStaleAfter
	}
	return nil
}

func (x *ClusterLoadAssignment_Policy) GetWeightedPriorityHealth() bool {
	if x != nil {
		return x.WeightedPriorityHealth
	}
	return false
}

type ClusterLoadAssignment_Policy_DropOverload struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Identifier for the policy specifying the drop.
	Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
	// Percentage of traffic that should be dropped for the category.
	DropPercentage *v3.FractionalPercent `protobuf:"bytes,2,opt,name=drop_percentage,json=dropPercentage,proto3" json:"drop_percentage,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

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

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

func (*ClusterLoadAssignment_Policy_DropOverload) ProtoMessage() {}

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

func (x *ClusterLoadAssignment_Policy_DropOverload) GetCategory() string {
	if x != nil {
		return x.Category
	}
	return ""
}

func (x *ClusterLoadAssignment_Policy_DropOverload) GetDropPercentage() *v3.FractionalPercent {
	if x != nil {
		return x.DropPercentage
	}
	return nil
}

var File_envoy_config_endpoint_v3_endpoint_proto protoreflect.FileDescriptor

const file_envoy_config_endpoint_v3_endpoint_proto_rawDesc = "" +
	"\n" +
	"'envoy/config/endpoint/v3/endpoint.proto\x12\x18envoy.config.endpoint.v3\x1a2envoy/config/endpoint/v3/endpoint_components.proto\x1a\x1benvoy/type/v3/percent.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\xe0\b\n" +
	"\x15ClusterLoadAssignment\x12*\n" +
	"\fcluster_name\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\vclusterName\x12K\n" +
	"\tendpoints\x18\x02 \x03(\v2-.envoy.config.endpoint.v3.LocalityLbEndpointsR\tendpoints\x12l\n" +
	"\x0fnamed_endpoints\x18\x05 \x03(\v2C.envoy.config.endpoint.v3.ClusterLoadAssignment.NamedEndpointsEntryR\x0enamedEndpoints\x12N\n" +
	"\x06policy\x18\x04 \x01(\v26.envoy.config.endpoint.v3.ClusterLoadAssignment.PolicyR\x06policy\x1a\xfd\x04\n" +
	"\x06Policy\x12j\n" +
	"\x0edrop_overloads\x18\x02 \x03(\v2C.envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverloadR\rdropOverloads\x12^\n" +
	"\x17overprovisioning_factor\x18\x03 \x01(\v2\x1c.google.protobuf.UInt32ValueB\a\xfaB\x04*\x02 \x00R\x16overprovisioningFactor\x12U\n" +
	"\x14endpoint_stale_after\x18\x04 \x01(\v2\x19.google.protobuf.DurationB\b\xfaB\x05\xaa\x01\x02*\x00R\x12endpointStaleAfter\x128\n" +
	"\x18weighted_priority_health\x18\x06 \x01(\bR\x16weightedPriorityHealth\x1a\xbd\x01\n" +
	"\fDropOverload\x12#\n" +
	"\bcategory\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\bcategory\x12I\n" +
	"\x0fdrop_percentage\x18\x02 \x01(\v2 .envoy.type.v3.FractionalPercentR\x0edropPercentage:=\x9aň\x1e8\n" +
	"6envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload:0\x9aň\x1e+\n" +
	")envoy.api.v2.ClusterLoadAssignment.PolicyJ\x04\b\x01\x10\x02J\x04\b\x05\x10\x06R\x18disable_overprovisioning\x1ae\n" +
	"\x13NamedEndpointsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x128\n" +
	"\x05value\x18\x02 \x01(\v2\".envoy.config.endpoint.v3.EndpointR\x05value:\x028\x01:)\x9aň\x1e$\n" +
	"\"envoy.api.v2.ClusterLoadAssignmentB\x8d\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"&io.envoyproxy.envoy.config.endpoint.v3B\rEndpointProtoP\x01ZJgithub.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3;endpointv3b\x06proto3"

var (
	file_envoy_config_endpoint_v3_endpoint_proto_rawDescOnce sync.Once
	file_envoy_config_endpoint_v3_endpoint_proto_rawDescData []byte
)

func file_envoy_config_endpoint_v3_endpoint_proto_rawDescGZIP() []byte {
	file_envoy_config_endpoint_v3_endpoint_proto_rawDescOnce.Do(func() {
		file_envoy_config_endpoint_v3_endpoint_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_config_endpoint_v3_endpoint_proto_rawDesc), len(file_envoy_config_endpoint_v3_endpoint_proto_rawDesc)))
	})
	return file_envoy_config_endpoint_v3_endpoint_proto_rawDescData
}

var file_envoy_config_endpoint_v3_endpoint_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_envoy_config_endpoint_v3_endpoint_proto_goTypes = []any{
	(*ClusterLoadAssignment)(nil),        // 0: envoy.config.endpoint.v3.ClusterLoadAssignment
	(*ClusterLoadAssignment_Policy)(nil), // 1: envoy.config.endpoint.v3.ClusterLoadAssignment.Policy
	nil,                                  // 2: envoy.config.endpoint.v3.ClusterLoadAssignment.NamedEndpointsEntry
	(*ClusterLoadAssignment_Policy_DropOverload)(nil), // 3: envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload
	(*LocalityLbEndpoints)(nil),                       // 4: envoy.config.endpoint.v3.LocalityLbEndpoints
	(*wrapperspb.UInt32Value)(nil),                    // 5: google.protobuf.UInt32Value
	(*durationpb.Duration)(nil),                       // 6: google.protobuf.Duration
	(*Endpoint)(nil),                                  // 7: envoy.config.endpoint.v3.Endpoint
	(*v3.FractionalPercent)(nil),                      // 8: envoy.type.v3.FractionalPercent
}
var file_envoy_config_endpoint_v3_endpoint_proto_depIdxs = []int32{
	4, // 0: envoy.config.endpoint.v3.ClusterLoadAssignment.endpoints:type_name -> envoy.config.endpoint.v3.LocalityLbEndpoints
	2, // 1: envoy.config.endpoint.v3.ClusterLoadAssignment.named_endpoints:type_name -> envoy.config.endpoint.v3.ClusterLoadAssignment.NamedEndpointsEntry
	1, // 2: envoy.config.endpoint.v3.ClusterLoadAssignment.policy:type_name -> envoy.config.endpoint.v3.ClusterLoadAssignment.Policy
	3, // 3: envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.drop_overloads:type_name -> envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload
	5, // 4: envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.overprovisioning_factor:type_name -> google.protobuf.UInt32Value
	6, // 5: envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.endpoint_stale_after:type_name -> google.protobuf.Duration
	7, // 6: envoy.config.endpoint.v3.ClusterLoadAssignment.NamedEndpointsEntry.value:type_name -> envoy.config.endpoint.v3.Endpoint
	8, // 7: envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload.drop_percentage:type_name -> envoy.type.v3.FractionalPercent
	8, // [8:8] is the sub-list for method output_type
	8, // [8:8] is the sub-list for method input_type
	8, // [8:8] is the sub-list for extension type_name
	8, // [8:8] is the sub-list for extension extendee
	0, // [0:8] is the sub-list for field type_name
}

func init() { file_envoy_config_endpoint_v3_endpoint_proto_init() }
func file_envoy_config_endpoint_v3_endpoint_proto_init() {
	if File_envoy_config_endpoint_v3_endpoint_proto != nil {
		return
	}
	file_envoy_config_endpoint_v3_endpoint_components_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_config_endpoint_v3_endpoint_proto_rawDesc), len(file_envoy_config_endpoint_v3_endpoint_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_config_endpoint_v3_endpoint_proto_goTypes,
		DependencyIndexes: file_envoy_config_endpoint_v3_endpoint_proto_depIdxs,
		MessageInfos:      file_envoy_config_endpoint_v3_endpoint_proto_msgTypes,
	}.Build()
	File_envoy_config_endpoint_v3_endpoint_proto = out.File
	file_envoy_config_endpoint_v3_endpoint_proto_goTypes = nil
	file_envoy_config_endpoint_v3_endpoint_proto_depIdxs = nil
}
