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

package dynamic_forward_proxyv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v31 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
	v32 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	v33 "github.com/envoyproxy/go-control-plane/envoy/extensions/clusters/dns/v3"
	v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/common/dynamic_forward_proxy/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)
)

// Configuration for the dynamic forward proxy cluster. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#extension: envoy.clusters.dynamic_forward_proxy]
type ClusterConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to ClusterImplementationSpecifier:
	//
	//	*ClusterConfig_DnsCacheConfig
	//	*ClusterConfig_SubClustersConfig
	ClusterImplementationSpecifier isClusterConfig_ClusterImplementationSpecifier `protobuf_oneof:"cluster_implementation_specifier"`
	// If true allow the cluster configuration to disable the auto_sni and auto_san_validation options
	// in the :ref:`cluster's upstream_http_protocol_options
	// <envoy_v3_api_field_config.cluster.v3.Cluster.upstream_http_protocol_options>`
	AllowInsecureClusterOptions bool `protobuf:"varint,2,opt,name=allow_insecure_cluster_options,json=allowInsecureClusterOptions,proto3" json:"allow_insecure_cluster_options,omitempty"`
	// If true allow HTTP/2 and HTTP/3 connections to be reused for requests to different
	// origins than the connection was initially created for. This will only happen when the
	// resolved address for the new connection matches the peer address of the connection and
	// the TLS certificate is also valid for the new hostname. For example, if a connection
	// has previously been established to foo.example.com at IP 1.2.3.4 with a certificate
	// that is valid for “*.example.com“, then this connection could be used for requests to
	// bar.example.com if that also resolved to 1.2.3.4.
	//
	// .. note::
	//
	//	By design, this feature will maximize reuse of connections. This means that instead
	//	opening a new connection when an existing connection reaches the maximum number of
	//	concurrent streams, requests will instead be sent to the existing connection.
	//
	// .. note::
	//
	//	The coalesced connections might be to upstreams that would not be otherwise
	//	selected by Envoy. See the section `Connection Reuse in RFC 7540
	//	<https://datatracker.ietf.org/doc/html/rfc7540#section-9.1.1>`_
	AllowCoalescedConnections bool `protobuf:"varint,3,opt,name=allow_coalesced_connections,json=allowCoalescedConnections,proto3" json:"allow_coalesced_connections,omitempty"`
	unknownFields             protoimpl.UnknownFields
	sizeCache                 protoimpl.SizeCache
}

func (x *ClusterConfig) Reset() {
	*x = ClusterConfig{}
	mi := &file_envoy_extensions_clusters_dynamic_forward_proxy_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_dynamic_forward_proxy_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_dynamic_forward_proxy_v3_cluster_proto_rawDescGZIP(), []int{0}
}

func (x *ClusterConfig) GetClusterImplementationSpecifier() isClusterConfig_ClusterImplementationSpecifier {
	if x != nil {
		return x.ClusterImplementationSpecifier
	}
	return nil
}

func (x *ClusterConfig) GetDnsCacheConfig() *v3.DnsCacheConfig {
	if x != nil {
		if x, ok := x.ClusterImplementationSpecifier.(*ClusterConfig_DnsCacheConfig); ok {
			return x.DnsCacheConfig
		}
	}
	return nil
}

func (x *ClusterConfig) GetSubClustersConfig() *SubClustersConfig {
	if x != nil {
		if x, ok := x.ClusterImplementationSpecifier.(*ClusterConfig_SubClustersConfig); ok {
			return x.SubClustersConfig
		}
	}
	return nil
}

func (x *ClusterConfig) GetAllowInsecureClusterOptions() bool {
	if x != nil {
		return x.AllowInsecureClusterOptions
	}
	return false
}

func (x *ClusterConfig) GetAllowCoalescedConnections() bool {
	if x != nil {
		return x.AllowCoalescedConnections
	}
	return false
}

type isClusterConfig_ClusterImplementationSpecifier interface {
	isClusterConfig_ClusterImplementationSpecifier()
}

type ClusterConfig_DnsCacheConfig struct {
	// The DNS cache configuration that the cluster will attach to. Note this configuration must
	// match that of associated :ref:`dynamic forward proxy HTTP filter configuration
	// <envoy_v3_api_field_extensions.filters.http.dynamic_forward_proxy.v3.FilterConfig.dns_cache_config>`.
	DnsCacheConfig *v3.DnsCacheConfig `protobuf:"bytes,1,opt,name=dns_cache_config,json=dnsCacheConfig,proto3,oneof"`
}

type ClusterConfig_SubClustersConfig struct {
	// Configuration for sub clusters, when this configuration is enabled,
	// Envoy will create an independent sub cluster dynamically for each host:port.
	// Most of the configuration of a sub cluster is inherited from the current cluster,
	// i.e. health_checks, dns_resolvers and etc.
	// And the load_assignment will be set to the only one endpoint, host:port.
	//
	// Compared to the dns_cache_config, it has the following advantages:
	//
	//  1. sub clusters will be created with the STRICT_DNS DiscoveryType,
	//     so that Envoy will use all of the IPs resolved from the host.
	//
	// 2. each sub cluster is full featured cluster, with lb_policy and health check and etc enabled.
	SubClustersConfig *SubClustersConfig `protobuf:"bytes,4,opt,name=sub_clusters_config,json=subClustersConfig,proto3,oneof"`
}

func (*ClusterConfig_DnsCacheConfig) isClusterConfig_ClusterImplementationSpecifier() {}

func (*ClusterConfig_SubClustersConfig) isClusterConfig_ClusterImplementationSpecifier() {}

// Configuration for sub clusters. Sub clusters default to the “STRICT_DNS“ discovery type, or
// use the “DnsCluster“ extension when “dns_cluster_config“ is set.
// [#next-free-field: 6]
type SubClustersConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
	// when picking a host in a sub cluster. Note that CLUSTER_PROVIDED is not allowed here.
	LbPolicy v31.Cluster_LbPolicy `protobuf:"varint,1,opt,name=lb_policy,json=lbPolicy,proto3,enum=envoy.config.cluster.v3.Cluster_LbPolicy" json:"lb_policy,omitempty"`
	// The maximum number of sub clusters that the DFP cluster will hold. If not specified defaults to 1024.
	MaxSubClusters *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=max_sub_clusters,json=maxSubClusters,proto3" json:"max_sub_clusters,omitempty"`
	// The TTL for sub clusters that are unused. Sub clusters that have not been used in the configured time
	// interval will be purged. If not specified defaults to 5m.
	SubClusterTtl *durationpb.Duration `protobuf:"bytes,3,opt,name=sub_cluster_ttl,json=subClusterTtl,proto3" json:"sub_cluster_ttl,omitempty"`
	// Sub clusters that should be created & warmed upon creation. This might provide a
	// performance improvement, in the form of cache hits, for sub clusters that are going to be
	// warmed during steady state and are known at config load time.
	PreresolveClusters []*v32.SocketAddress `protobuf:"bytes,4,rep,name=preresolve_clusters,json=preresolveClusters,proto3" json:"preresolve_clusters,omitempty"`
	// Optional DNS configuration for dynamically created sub clusters. When set, sub clusters
	// are created using the :ref:`DnsCluster <envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>`
	// extension (“envoy.cluster.dns“) rather than the legacy “STRICT_DNS“ discovery type,
	// enabling full DNS configuration including refresh rates, failure backoff, TTL respect,
	// lookup family, and resolver selection.
	//
	// When not set, sub clusters inherit DNS settings from the parent cluster configuration.
	DnsClusterConfig *v33.DnsCluster `protobuf:"bytes,5,opt,name=dns_cluster_config,json=dnsClusterConfig,proto3" json:"dns_cluster_config,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

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

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

func (*SubClustersConfig) ProtoMessage() {}

func (x *SubClustersConfig) ProtoReflect() protoreflect.Message {
	mi := &file_envoy_extensions_clusters_dynamic_forward_proxy_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 SubClustersConfig.ProtoReflect.Descriptor instead.
func (*SubClustersConfig) Descriptor() ([]byte, []int) {
	return file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDescGZIP(), []int{1}
}

func (x *SubClustersConfig) GetLbPolicy() v31.Cluster_LbPolicy {
	if x != nil {
		return x.LbPolicy
	}
	return v31.Cluster_LbPolicy(0)
}

func (x *SubClustersConfig) GetMaxSubClusters() *wrapperspb.UInt32Value {
	if x != nil {
		return x.MaxSubClusters
	}
	return nil
}

func (x *SubClustersConfig) GetSubClusterTtl() *durationpb.Duration {
	if x != nil {
		return x.SubClusterTtl
	}
	return nil
}

func (x *SubClustersConfig) GetPreresolveClusters() []*v32.SocketAddress {
	if x != nil {
		return x.PreresolveClusters
	}
	return nil
}

func (x *SubClustersConfig) GetDnsClusterConfig() *v33.DnsCluster {
	if x != nil {
		return x.DnsClusterConfig
	}
	return nil
}

var File_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto protoreflect.FileDescriptor

const file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDesc = "" +
	"\n" +
	"@envoy/extensions/clusters/dynamic_forward_proxy/v3/cluster.proto\x122envoy.extensions.clusters.dynamic_forward_proxy.v3\x1a%envoy/config/cluster/v3/cluster.proto\x1a\"envoy/config/core/v3/address.proto\x1a2envoy/extensions/clusters/dns/v3/dns_cluster.proto\x1a@envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.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\"\xe8\x03\n" +
	"\rClusterConfig\x12l\n" +
	"\x10dns_cache_config\x18\x01 \x01(\v2@.envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfigH\x00R\x0ednsCacheConfig\x12w\n" +
	"\x13sub_clusters_config\x18\x04 \x01(\v2E.envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfigH\x00R\x11subClustersConfig\x12C\n" +
	"\x1eallow_insecure_cluster_options\x18\x02 \x01(\bR\x1ballowInsecureClusterOptions\x12>\n" +
	"\x1ballow_coalesced_connections\x18\x03 \x01(\bR\x19allowCoalescedConnections:G\x9aň\x1eB\n" +
	"@envoy.config.cluster.dynamic_forward_proxy.v2alpha.ClusterConfigB\"\n" +
	" cluster_implementation_specifier\"\xb5\x03\n" +
	"\x11SubClustersConfig\x12P\n" +
	"\tlb_policy\x18\x01 \x01(\x0e2).envoy.config.cluster.v3.Cluster.LbPolicyB\b\xfaB\x05\x82\x01\x02\x10\x01R\blbPolicy\x12O\n" +
	"\x10max_sub_clusters\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueB\a\xfaB\x04*\x02 \x00R\x0emaxSubClusters\x12K\n" +
	"\x0fsub_cluster_ttl\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\b\xfaB\x05\xaa\x01\x02*\x00R\rsubClusterTtl\x12T\n" +
	"\x13preresolve_clusters\x18\x04 \x03(\v2#.envoy.config.core.v3.SocketAddressR\x12preresolveClusters\x12Z\n" +
	"\x12dns_cluster_config\x18\x05 \x01(\v2,.envoy.extensions.clusters.dns.v3.DnsClusterR\x10dnsClusterConfigB\xcd\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"@io.envoyproxy.envoy.extensions.clusters.dynamic_forward_proxy.v3B\fClusterProtoP\x01Zqgithub.com/envoyproxy/go-control-plane/envoy/extensions/clusters/dynamic_forward_proxy/v3;dynamic_forward_proxyv3b\x06proto3"

var (
	file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDescOnce sync.Once
	file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDescData []byte
)

func file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDescGZIP() []byte {
	file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDesc), len(file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDesc)))
	})
	return file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDescData
}

var file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_goTypes = []any{
	(*ClusterConfig)(nil),          // 0: envoy.extensions.clusters.dynamic_forward_proxy.v3.ClusterConfig
	(*SubClustersConfig)(nil),      // 1: envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfig
	(*v3.DnsCacheConfig)(nil),      // 2: envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig
	(v31.Cluster_LbPolicy)(0),      // 3: envoy.config.cluster.v3.Cluster.LbPolicy
	(*wrapperspb.UInt32Value)(nil), // 4: google.protobuf.UInt32Value
	(*durationpb.Duration)(nil),    // 5: google.protobuf.Duration
	(*v32.SocketAddress)(nil),      // 6: envoy.config.core.v3.SocketAddress
	(*v33.DnsCluster)(nil),         // 7: envoy.extensions.clusters.dns.v3.DnsCluster
}
var file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.clusters.dynamic_forward_proxy.v3.ClusterConfig.dns_cache_config:type_name -> envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig
	1, // 1: envoy.extensions.clusters.dynamic_forward_proxy.v3.ClusterConfig.sub_clusters_config:type_name -> envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfig
	3, // 2: envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfig.lb_policy:type_name -> envoy.config.cluster.v3.Cluster.LbPolicy
	4, // 3: envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfig.max_sub_clusters:type_name -> google.protobuf.UInt32Value
	5, // 4: envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfig.sub_cluster_ttl:type_name -> google.protobuf.Duration
	6, // 5: envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfig.preresolve_clusters:type_name -> envoy.config.core.v3.SocketAddress
	7, // 6: envoy.extensions.clusters.dynamic_forward_proxy.v3.SubClustersConfig.dns_cluster_config:type_name -> envoy.extensions.clusters.dns.v3.DnsCluster
	7, // [7:7] is the sub-list for method output_type
	7, // [7:7] is the sub-list for method input_type
	7, // [7:7] is the sub-list for extension type_name
	7, // [7:7] is the sub-list for extension extendee
	0, // [0:7] is the sub-list for field type_name
}

func init() { file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_init() }
func file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_init() {
	if File_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto != nil {
		return
	}
	file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_msgTypes[0].OneofWrappers = []any{
		(*ClusterConfig_DnsCacheConfig)(nil),
		(*ClusterConfig_SubClustersConfig)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDesc), len(file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_msgTypes,
	}.Build()
	File_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto = out.File
	file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_goTypes = nil
	file_envoy_extensions_clusters_dynamic_forward_proxy_v3_cluster_proto_depIdxs = nil
}
