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

package compositev3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "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 composite cluster. See the :ref:`architecture overview
// <arch_overview_composite_cluster>` for more information. This cluster type enables retry-aware
// cluster selection, allowing different retry attempts to automatically target
// different upstream clusters. Unlike the standard aggregate cluster which uses
// health-based selection, the composite cluster uses the retry attempt count to
// deterministically select which sub-cluster to route to.
//
// When retry attempts exceed the number of configured clusters, requests will fail with no
// host available.
//
// Example configuration:
//
// .. code-block:: yaml
//
//	name: composite_cluster
//	connect_timeout: 0.25s
//	lb_policy: CLUSTER_PROVIDED
//	cluster_type:
//	  name: envoy.clusters.composite
//	  typed_config:
//	    "@type": type.googleapis.com/envoy.extensions.clusters.composite.v3.ClusterConfig
//	    clusters:
//	    - name: primary_cluster
//	    - name: secondary_cluster
//	    - name: fallback_cluster
//
// [#extension: envoy.clusters.composite]
type ClusterConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// List of clusters to use for request routing. The first cluster is used for the
	// initial request (attempt 1), the second cluster for the first retry (attempt 2),
	// and so on. Must contain at least one cluster. When retry attempts exceed the number
	// of configured clusters, requests will fail with no host available.
	Clusters      []*ClusterConfig_ClusterEntry `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ClusterConfig) ProtoMessage() {}

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

func (x *ClusterConfig) GetClusters() []*ClusterConfig_ClusterEntry {
	if x != nil {
		return x.Clusters
	}
	return nil
}

// Configuration for an individual cluster entry.
type ClusterConfig_ClusterEntry struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the cluster. This cluster must be defined elsewhere in the configuration.
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ClusterConfig_ClusterEntry) ProtoMessage() {}

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

func (x *ClusterConfig_ClusterEntry) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

var File_envoy_extensions_clusters_composite_v3_cluster_proto protoreflect.FileDescriptor

const file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDesc = "" +
	"\n" +
	"4envoy/extensions/clusters/composite/v3/cluster.proto\x12&envoy.extensions.clusters.composite.v3\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xa6\x01\n" +
	"\rClusterConfig\x12h\n" +
	"\bclusters\x18\x01 \x03(\v2B.envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntryB\b\xfaB\x05\x92\x01\x02\b\x01R\bclusters\x1a+\n" +
	"\fClusterEntry\x12\x1b\n" +
	"\x04name\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x04nameB\xa9\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"4io.envoyproxy.envoy.extensions.clusters.composite.v3B\fClusterProtoP\x01ZYgithub.com/envoyproxy/go-control-plane/envoy/extensions/clusters/composite/v3;compositev3b\x06proto3"

var (
	file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDescOnce sync.Once
	file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDescData []byte
)

func file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDescGZIP() []byte {
	file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDesc), len(file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDesc)))
	})
	return file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDescData
}

var file_envoy_extensions_clusters_composite_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_clusters_composite_v3_cluster_proto_goTypes = []any{
	(*ClusterConfig)(nil),              // 0: envoy.extensions.clusters.composite.v3.ClusterConfig
	(*ClusterConfig_ClusterEntry)(nil), // 1: envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry
}
var file_envoy_extensions_clusters_composite_v3_cluster_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.clusters.composite.v3.ClusterConfig.clusters:type_name -> envoy.extensions.clusters.composite.v3.ClusterConfig.ClusterEntry
	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_extensions_clusters_composite_v3_cluster_proto_init() }
func file_envoy_extensions_clusters_composite_v3_cluster_proto_init() {
	if File_envoy_extensions_clusters_composite_v3_cluster_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_clusters_composite_v3_cluster_proto_rawDesc), len(file_envoy_extensions_clusters_composite_v3_cluster_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_clusters_composite_v3_cluster_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_clusters_composite_v3_cluster_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_clusters_composite_v3_cluster_proto_msgTypes,
	}.Build()
	File_envoy_extensions_clusters_composite_v3_cluster_proto = out.File
	file_envoy_extensions_clusters_composite_v3_cluster_proto_goTypes = nil
	file_envoy_extensions_clusters_composite_v3_cluster_proto_depIdxs = nil
}
