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

package dnsv3

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

// [#next-free-field: 11]
type DnsCluster struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// This value is the cluster’s DNS refresh rate. The value configured must be at least 1ms.
	// If this setting is not specified, the
	// value defaults to 5000ms.
	DnsRefreshRate *durationpb.Duration `protobuf:"bytes,3,opt,name=dns_refresh_rate,json=dnsRefreshRate,proto3" json:"dns_refresh_rate,omitempty"`
	// This is the cluster’s DNS refresh rate when requests are failing. If this setting is
	// not specified, the failure refresh rate defaults to the DNS refresh rate.
	DnsFailureRefreshRate *DnsCluster_RefreshRate `protobuf:"bytes,4,opt,name=dns_failure_refresh_rate,json=dnsFailureRefreshRate,proto3" json:"dns_failure_refresh_rate,omitempty"`
	// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
	// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
	// resolution.
	RespectDnsTtl bool `protobuf:"varint,5,opt,name=respect_dns_ttl,json=respectDnsTtl,proto3" json:"respect_dns_ttl,omitempty"`
	// DNS jitter causes the cluster to refresh DNS entries later by a random amount of time to avoid a
	// stampede of DNS requests. This value sets the upper bound (exclusive) for the random amount.
	// There will be no jitter if this value is omitted.
	DnsJitter *durationpb.Duration `protobuf:"bytes,6,opt,name=dns_jitter,json=dnsJitter,proto3" json:"dns_jitter,omitempty"`
	// DNS resolver type configuration extension. This extension can be used to configure c-ares, apple,
	// or any other DNS resolver types and the related parameters.
	// For example, an object of
	// :ref:`CaresDnsResolverConfig<envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig>`
	// can be packed into this “typed_dns_resolver_config“. This configuration replaces the
	// :ref:`Cluster.typed_dns_resolver_config<envoy_v3_api_field_config.cluster.v3.Cluster.typed_dns_resolver_config>`
	// configuration which replaces :ref:`Cluster.dns_resolution_config<envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>`.
	// During the transition period when
	// :ref:`DnsCluster.typed_dns_resolver_config<envoy_v3_api_field_extensions.clusters.dns.v3.DnsCluster.typed_dns_resolver_config>`,
	// :ref:`Cluster.typed_dns_resolver_config<envoy_v3_api_field_config.cluster.v3.Cluster.typed_dns_resolver_config>`,
	// and :ref:`Cluster.dns_resolution_config<envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>`
	// exist, Envoy will use
	// :ref:`DnsCluster.typed_dns_resolver_config<envoy_v3_api_field_extensions.clusters.dns.v3.DnsCluster.typed_dns_resolver_config>`
	// and ignore
	// DNS resolver-related fields in :ref:`Cluster<envoy_v3_api_msg_config.cluster.v3.Cluster>` if the cluster is configured via the
	// :ref:`Cluster.cluster_type<envoy_v3_api_field_config.cluster.v3.Cluster.cluster_type>` extension point with the
	// :ref:`DnsCluster<envoy_v3_api_msg_extensions.clusters.dns.v3.DnsCluster>` extension type.
	// Otherwise, see  :ref:`Cluster.typed_dns_resolver_config<envoy_v3_api_field_config.cluster.v3.Cluster.typed_dns_resolver_config>`.
	// [#extension-category: envoy.network.dns_resolver]
	TypedDnsResolverConfig *v3.TypedExtensionConfig `protobuf:"bytes,7,opt,name=typed_dns_resolver_config,json=typedDnsResolverConfig,proto3" json:"typed_dns_resolver_config,omitempty"`
	// The DNS IP address resolution policy. If this setting is not specified, the
	// value defaults to
	// :ref:`AUTO<envoy_v3_api_enum_value_extensions.clusters.common.dns.v3.DnsLookupFamily.AUTO>`.
	DnsLookupFamily v31.DnsLookupFamily `protobuf:"varint,8,opt,name=dns_lookup_family,json=dnsLookupFamily,proto3,enum=envoy.extensions.clusters.common.dns.v3.DnsLookupFamily" json:"dns_lookup_family,omitempty"`
	// If true, all returned addresses are considered to be associated with a single endpoint,
	// which maps to :ref:`logical DNS discovery <arch_overview_service_discovery_types_logical_dns>`
	// semantics. Otherwise, each address is considered to be a separate endpoint, which maps to
	// :ref:`strict DNS discovery <arch_overview_service_discovery_types_strict_dns>` semantics.
	AllAddressesInSingleEndpoint bool `protobuf:"varint,9,opt,name=all_addresses_in_single_endpoint,json=allAddressesInSingleEndpoint,proto3" json:"all_addresses_in_single_endpoint,omitempty"`
	// When :ref:`respect_dns_ttl <envoy_v3_api_field_extensions.clusters.dns.v3.DnsCluster.respect_dns_ttl>`
	// is enabled, this field specifies a minimum value for the TTL-derived DNS refresh rate.
	// DNS records with TTLs shorter than this value will be refreshed at this rate instead. If not
	// set, the TTL from the DNS response is used directly with no minimum floor.
	// The value must be at least 1 second.
	DnsMinRefreshRate *durationpb.Duration `protobuf:"bytes,10,opt,name=dns_min_refresh_rate,json=dnsMinRefreshRate,proto3" json:"dns_min_refresh_rate,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*DnsCluster) ProtoMessage() {}

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

func (x *DnsCluster) GetDnsRefreshRate() *durationpb.Duration {
	if x != nil {
		return x.DnsRefreshRate
	}
	return nil
}

func (x *DnsCluster) GetDnsFailureRefreshRate() *DnsCluster_RefreshRate {
	if x != nil {
		return x.DnsFailureRefreshRate
	}
	return nil
}

func (x *DnsCluster) GetRespectDnsTtl() bool {
	if x != nil {
		return x.RespectDnsTtl
	}
	return false
}

func (x *DnsCluster) GetDnsJitter() *durationpb.Duration {
	if x != nil {
		return x.DnsJitter
	}
	return nil
}

func (x *DnsCluster) GetTypedDnsResolverConfig() *v3.TypedExtensionConfig {
	if x != nil {
		return x.TypedDnsResolverConfig
	}
	return nil
}

func (x *DnsCluster) GetDnsLookupFamily() v31.DnsLookupFamily {
	if x != nil {
		return x.DnsLookupFamily
	}
	return v31.DnsLookupFamily(0)
}

func (x *DnsCluster) GetAllAddressesInSingleEndpoint() bool {
	if x != nil {
		return x.AllAddressesInSingleEndpoint
	}
	return false
}

func (x *DnsCluster) GetDnsMinRefreshRate() *durationpb.Duration {
	if x != nil {
		return x.DnsMinRefreshRate
	}
	return nil
}

type DnsCluster_RefreshRate struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Specifies the base interval between refreshes. This parameter is required and must be greater
	// than zero and less than
	// :ref:`max_interval <envoy_v3_api_field_extensions.clusters.dns.v3.DnsCluster.RefreshRate.max_interval>`.
	BaseInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=base_interval,json=baseInterval,proto3" json:"base_interval,omitempty"`
	// Specifies the maximum interval between refreshes. This parameter is optional, but must be
	// greater than or equal to the
	// :ref:`base_interval <envoy_v3_api_field_extensions.clusters.dns.v3.DnsCluster.RefreshRate.base_interval>`  if set. The default
	// is 10 times the :ref:`base_interval <envoy_v3_api_field_extensions.clusters.dns.v3.DnsCluster.RefreshRate.base_interval>`.
	MaxInterval   *durationpb.Duration `protobuf:"bytes,2,opt,name=max_interval,json=maxInterval,proto3" json:"max_interval,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*DnsCluster_RefreshRate) ProtoMessage() {}

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

func (x *DnsCluster_RefreshRate) GetBaseInterval() *durationpb.Duration {
	if x != nil {
		return x.BaseInterval
	}
	return nil
}

func (x *DnsCluster_RefreshRate) GetMaxInterval() *durationpb.Duration {
	if x != nil {
		return x.MaxInterval
	}
	return nil
}

var File_envoy_extensions_clusters_dns_v3_dns_cluster_proto protoreflect.FileDescriptor

const file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc = "" +
	"\n" +
	"2envoy/extensions/clusters/dns/v3/dns_cluster.proto\x12 envoy.extensions.clusters.dns.v3\x1a$envoy/config/core/v3/extension.proto\x1a1envoy/extensions/clusters/common/dns/v3/dns.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xd7\x06\n" +
	"\n" +
	"DnsCluster\x12Q\n" +
	"\x10dns_refresh_rate\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\f\xfaB\t\xaa\x01\x06*\x04\x10\xc0\x84=R\x0ednsRefreshRate\x12q\n" +
	"\x18dns_failure_refresh_rate\x18\x04 \x01(\v28.envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRateR\x15dnsFailureRefreshRate\x12&\n" +
	"\x0frespect_dns_ttl\x18\x05 \x01(\bR\rrespectDnsTtl\x12B\n" +
	"\n" +
	"dns_jitter\x18\x06 \x01(\v2\x19.google.protobuf.DurationB\b\xfaB\x05\xaa\x01\x022\x00R\tdnsJitter\x12e\n" +
	"\x19typed_dns_resolver_config\x18\a \x01(\v2*.envoy.config.core.v3.TypedExtensionConfigR\x16typedDnsResolverConfig\x12d\n" +
	"\x11dns_lookup_family\x18\b \x01(\x0e28.envoy.extensions.clusters.common.dns.v3.DnsLookupFamilyR\x0fdnsLookupFamily\x12F\n" +
	" all_addresses_in_single_endpoint\x18\t \x01(\bR\x1callAddressesInSingleEndpoint\x12V\n" +
	"\x14dns_min_refresh_rate\x18\n" +
	" \x01(\v2\x19.google.protobuf.DurationB\n" +
	"\xfaB\a\xaa\x01\x042\x02\b\x01R\x11dnsMinRefreshRate\x1a\xa9\x01\n" +
	"\vRefreshRate\x12N\n" +
	"\rbase_interval\x18\x01 \x01(\v2\x19.google.protobuf.DurationB\x0e\xfaB\v\xaa\x01\b\b\x01*\x04\x10\xc0\x84=R\fbaseInterval\x12J\n" +
	"\fmax_interval\x18\x02 \x01(\v2\x19.google.protobuf.DurationB\f\xfaB\t\xaa\x01\x06*\x04\x10\xc0\x84=R\vmaxIntervalB\x9a\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	".io.envoyproxy.envoy.extensions.clusters.dns.v3B\x0fDnsClusterProtoP\x01ZMgithub.com/envoyproxy/go-control-plane/envoy/extensions/clusters/dns/v3;dnsv3b\x06proto3"

var (
	file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescOnce sync.Once
	file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescData []byte
)

func file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescGZIP() []byte {
	file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc), len(file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc)))
	})
	return file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDescData
}

var file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_goTypes = []any{
	(*DnsCluster)(nil),              // 0: envoy.extensions.clusters.dns.v3.DnsCluster
	(*DnsCluster_RefreshRate)(nil),  // 1: envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate
	(*durationpb.Duration)(nil),     // 2: google.protobuf.Duration
	(*v3.TypedExtensionConfig)(nil), // 3: envoy.config.core.v3.TypedExtensionConfig
	(v31.DnsLookupFamily)(0),        // 4: envoy.extensions.clusters.common.dns.v3.DnsLookupFamily
}
var file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.clusters.dns.v3.DnsCluster.dns_refresh_rate:type_name -> google.protobuf.Duration
	1, // 1: envoy.extensions.clusters.dns.v3.DnsCluster.dns_failure_refresh_rate:type_name -> envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate
	2, // 2: envoy.extensions.clusters.dns.v3.DnsCluster.dns_jitter:type_name -> google.protobuf.Duration
	3, // 3: envoy.extensions.clusters.dns.v3.DnsCluster.typed_dns_resolver_config:type_name -> envoy.config.core.v3.TypedExtensionConfig
	4, // 4: envoy.extensions.clusters.dns.v3.DnsCluster.dns_lookup_family:type_name -> envoy.extensions.clusters.common.dns.v3.DnsLookupFamily
	2, // 5: envoy.extensions.clusters.dns.v3.DnsCluster.dns_min_refresh_rate:type_name -> google.protobuf.Duration
	2, // 6: envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate.base_interval:type_name -> google.protobuf.Duration
	2, // 7: envoy.extensions.clusters.dns.v3.DnsCluster.RefreshRate.max_interval:type_name -> google.protobuf.Duration
	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_extensions_clusters_dns_v3_dns_cluster_proto_init() }
func file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_init() {
	if File_envoy_extensions_clusters_dns_v3_dns_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_dns_v3_dns_cluster_proto_rawDesc), len(file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_msgTypes,
	}.Build()
	File_envoy_extensions_clusters_dns_v3_dns_cluster_proto = out.File
	file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_goTypes = nil
	file_envoy_extensions_clusters_dns_v3_dns_cluster_proto_depIdxs = nil
}
