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

package apiv2

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	endpoint "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
	_type "github.com/envoyproxy/go-control-plane/envoy/type"
	_ "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_api_field_Cluster.EdsClusterConfig.service_name>` value if specified
	// in the cluster :ref:`EdsClusterConfig
	// <envoy_api_msg_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 []*endpoint.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.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_api_v2_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_api_v2_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_api_v2_endpoint_proto_rawDescGZIP(), []int{0}
}

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

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

func (x *ClusterLoadAssignment) GetNamedEndpoints() map[string]*endpoint.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: 6]
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.
	//
	// [#not-implemented-hide:]
	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 percentage 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"`
	// The flag to disable overprovisioning. If it is set to true,
	// :ref:`overprovisioning factor
	// <arch_overview_load_balancing_overprovisioning_factor>` will be ignored
	// and Envoy will not perform graceful failover between priority levels or
	// localities as endpoints become unhealthy. Otherwise Envoy will perform
	// graceful failover as :ref:`overprovisioning factor
	// <arch_overview_load_balancing_overprovisioning_factor>` suggests.
	// [#not-implemented-hide:]
	//
	// Deprecated: Marked as deprecated in envoy/api/v2/endpoint.proto.
	DisableOverprovisioning bool `protobuf:"varint,5,opt,name=disable_overprovisioning,json=disableOverprovisioning,proto3" json:"disable_overprovisioning,omitempty"`
	unknownFields           protoimpl.UnknownFields
	sizeCache               protoimpl.SizeCache
}

func (x *ClusterLoadAssignment_Policy) Reset() {
	*x = ClusterLoadAssignment_Policy{}
	mi := &file_envoy_api_v2_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_api_v2_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_api_v2_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
}

// Deprecated: Marked as deprecated in envoy/api/v2/endpoint.proto.
func (x *ClusterLoadAssignment_Policy) GetDisableOverprovisioning() bool {
	if x != nil {
		return x.DisableOverprovisioning
	}
	return false
}

// [#not-implemented-hide:]
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 *_type.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_api_v2_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_api_v2_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_api_v2_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() *_type.FractionalPercent {
	if x != nil {
		return x.DropPercentage
	}
	return nil
}

var File_envoy_api_v2_endpoint_proto protoreflect.FileDescriptor

const file_envoy_api_v2_endpoint_proto_rawDesc = "" +
	"\n" +
	"\x1benvoy/api/v2/endpoint.proto\x12\fenvoy.api.v2\x1a/envoy/api/v2/endpoint/endpoint_components.proto\x1a\x18envoy/type/percent.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xfb\x06\n" +
	"\x15ClusterLoadAssignment\x12*\n" +
	"\fcluster_name\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\vclusterName\x12H\n" +
	"\tendpoints\x18\x02 \x03(\v2*.envoy.api.v2.endpoint.LocalityLbEndpointsR\tendpoints\x12`\n" +
	"\x0fnamed_endpoints\x18\x05 \x03(\v27.envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntryR\x0enamedEndpoints\x12B\n" +
	"\x06policy\x18\x04 \x01(\v2*.envoy.api.v2.ClusterLoadAssignment.PolicyR\x06policy\x1a\xe1\x03\n" +
	"\x06Policy\x12^\n" +
	"\x0edrop_overloads\x18\x02 \x03(\v27.envoy.api.v2.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\x12=\n" +
	"\x18disable_overprovisioning\x18\x05 \x01(\bB\x02\x18\x01R\x17disableOverprovisioning\x1a{\n" +
	"\fDropOverload\x12#\n" +
	"\bcategory\x18\x01 \x01(\tB\a\xfaB\x04r\x02 \x01R\bcategory\x12F\n" +
	"\x0fdrop_percentage\x18\x02 \x01(\v2\x1d.envoy.type.FractionalPercentR\x0edropPercentageJ\x04\b\x01\x10\x02\x1ab\n" +
	"\x13NamedEndpointsEntry\x12\x10\n" +
	"\x03key\x18\x01 \x01(\tR\x03key\x125\n" +
	"\x05value\x18\x02 \x01(\v2\x1f.envoy.api.v2.endpoint.EndpointR\x05value:\x028\x01B\x90\x01\xf2\x98\xfe\x8f\x05\x1a\x12\x18envoy.config.endpoint.v3\xba\x80\xc8\xd1\x06\x02\x10\x01\n" +
	"\x1aio.envoyproxy.envoy.api.v2B\rEndpointProtoP\x01Z9github.com/envoyproxy/go-control-plane/envoy/api/v2;apiv2b\x06proto3"

var (
	file_envoy_api_v2_endpoint_proto_rawDescOnce sync.Once
	file_envoy_api_v2_endpoint_proto_rawDescData []byte
)

func file_envoy_api_v2_endpoint_proto_rawDescGZIP() []byte {
	file_envoy_api_v2_endpoint_proto_rawDescOnce.Do(func() {
		file_envoy_api_v2_endpoint_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_api_v2_endpoint_proto_rawDesc), len(file_envoy_api_v2_endpoint_proto_rawDesc)))
	})
	return file_envoy_api_v2_endpoint_proto_rawDescData
}

var file_envoy_api_v2_endpoint_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_envoy_api_v2_endpoint_proto_goTypes = []any{
	(*ClusterLoadAssignment)(nil),        // 0: envoy.api.v2.ClusterLoadAssignment
	(*ClusterLoadAssignment_Policy)(nil), // 1: envoy.api.v2.ClusterLoadAssignment.Policy
	nil,                                  // 2: envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry
	(*ClusterLoadAssignment_Policy_DropOverload)(nil), // 3: envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload
	(*endpoint.LocalityLbEndpoints)(nil),              // 4: envoy.api.v2.endpoint.LocalityLbEndpoints
	(*wrapperspb.UInt32Value)(nil),                    // 5: google.protobuf.UInt32Value
	(*durationpb.Duration)(nil),                       // 6: google.protobuf.Duration
	(*endpoint.Endpoint)(nil),                         // 7: envoy.api.v2.endpoint.Endpoint
	(*_type.FractionalPercent)(nil),                   // 8: envoy.type.FractionalPercent
}
var file_envoy_api_v2_endpoint_proto_depIdxs = []int32{
	4, // 0: envoy.api.v2.ClusterLoadAssignment.endpoints:type_name -> envoy.api.v2.endpoint.LocalityLbEndpoints
	2, // 1: envoy.api.v2.ClusterLoadAssignment.named_endpoints:type_name -> envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry
	1, // 2: envoy.api.v2.ClusterLoadAssignment.policy:type_name -> envoy.api.v2.ClusterLoadAssignment.Policy
	3, // 3: envoy.api.v2.ClusterLoadAssignment.Policy.drop_overloads:type_name -> envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload
	5, // 4: envoy.api.v2.ClusterLoadAssignment.Policy.overprovisioning_factor:type_name -> google.protobuf.UInt32Value
	6, // 5: envoy.api.v2.ClusterLoadAssignment.Policy.endpoint_stale_after:type_name -> google.protobuf.Duration
	7, // 6: envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry.value:type_name -> envoy.api.v2.endpoint.Endpoint
	8, // 7: envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload.drop_percentage:type_name -> envoy.type.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_api_v2_endpoint_proto_init() }
func file_envoy_api_v2_endpoint_proto_init() {
	if File_envoy_api_v2_endpoint_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_api_v2_endpoint_proto_rawDesc), len(file_envoy_api_v2_endpoint_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_api_v2_endpoint_proto_goTypes,
		DependencyIndexes: file_envoy_api_v2_endpoint_proto_depIdxs,
		MessageInfos:      file_envoy_api_v2_endpoint_proto_msgTypes,
	}.Build()
	File_envoy_api_v2_endpoint_proto = out.File
	file_envoy_api_v2_endpoint_proto_goTypes = nil
	file_envoy_api_v2_endpoint_proto_depIdxs = nil
}
