// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.7
// 	protoc        v5.27.5
// source: github.com/cloudprober/cloudprober/common/tlsconfig/proto/config.proto

package proto

import (
	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)
)

type TLSVersion int32

const (
	TLSVersion_TLS_AUTO TLSVersion = 0
	TLSVersion_TLS_1_0  TLSVersion = 1
	TLSVersion_TLS_1_1  TLSVersion = 2
	TLSVersion_TLS_1_2  TLSVersion = 3
	TLSVersion_TLS_1_3  TLSVersion = 4
)

// Enum value maps for TLSVersion.
var (
	TLSVersion_name = map[int32]string{
		0: "TLS_AUTO",
		1: "TLS_1_0",
		2: "TLS_1_1",
		3: "TLS_1_2",
		4: "TLS_1_3",
	}
	TLSVersion_value = map[string]int32{
		"TLS_AUTO": 0,
		"TLS_1_0":  1,
		"TLS_1_1":  2,
		"TLS_1_2":  3,
		"TLS_1_3":  4,
	}
)

func (x TLSVersion) Enum() *TLSVersion {
	p := new(TLSVersion)
	*p = x
	return p
}

func (x TLSVersion) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (TLSVersion) Descriptor() protoreflect.EnumDescriptor {
	return file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_enumTypes[0].Descriptor()
}

func (TLSVersion) Type() protoreflect.EnumType {
	return &file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_enumTypes[0]
}

func (x TLSVersion) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Do not use.
func (x *TLSVersion) UnmarshalJSON(b []byte) error {
	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
	if err != nil {
		return err
	}
	*x = TLSVersion(num)
	return nil
}

// Deprecated: Use TLSVersion.Descriptor instead.
func (TLSVersion) EnumDescriptor() ([]byte, []int) {
	return file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDescGZIP(), []int{0}
}

type TLSConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// CA certificate file to verify certificates provided by the other party.
	CaCertFile *string `protobuf:"bytes,1,opt,name=ca_cert_file,json=caCertFile" json:"ca_cert_file,omitempty"`
	// Local certificate file.
	TlsCertFile *string `protobuf:"bytes,2,opt,name=tls_cert_file,json=tlsCertFile" json:"tls_cert_file,omitempty"`
	// Private key file corresponding to the certificate above.
	TlsKeyFile *string `protobuf:"bytes,3,opt,name=tls_key_file,json=tlsKeyFile" json:"tls_key_file,omitempty"`
	// Whether to ignore the cert validation.
	DisableCertValidation *bool `protobuf:"varint,4,opt,name=disable_cert_validation,json=disableCertValidation" json:"disable_cert_validation,omitempty"`
	// ServerName override
	ServerName    *string     `protobuf:"bytes,5,opt,name=server_name,json=serverName" json:"server_name,omitempty"`
	MinTlsVersion *TLSVersion `protobuf:"varint,7,opt,name=min_tls_version,json=minTlsVersion,enum=cloudprober.tlsconfig.TLSVersion" json:"min_tls_version,omitempty"`
	MaxTlsVersion *TLSVersion `protobuf:"varint,8,opt,name=max_tls_version,json=maxTlsVersion,enum=cloudprober.tlsconfig.TLSVersion" json:"max_tls_version,omitempty"`
	// Certificate reload interval in seconds. If configured, the TLS cert will
	// be reloaded every reload_interval_sec seconds. This is useful when
	// certificates are generated and refreshed dynamically.
	ReloadIntervalSec *int32 `protobuf:"varint,6,opt,name=reload_interval_sec,json=reloadIntervalSec" json:"reload_interval_sec,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*TLSConfig) ProtoMessage() {}

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

func (x *TLSConfig) GetCaCertFile() string {
	if x != nil && x.CaCertFile != nil {
		return *x.CaCertFile
	}
	return ""
}

func (x *TLSConfig) GetTlsCertFile() string {
	if x != nil && x.TlsCertFile != nil {
		return *x.TlsCertFile
	}
	return ""
}

func (x *TLSConfig) GetTlsKeyFile() string {
	if x != nil && x.TlsKeyFile != nil {
		return *x.TlsKeyFile
	}
	return ""
}

func (x *TLSConfig) GetDisableCertValidation() bool {
	if x != nil && x.DisableCertValidation != nil {
		return *x.DisableCertValidation
	}
	return false
}

func (x *TLSConfig) GetServerName() string {
	if x != nil && x.ServerName != nil {
		return *x.ServerName
	}
	return ""
}

func (x *TLSConfig) GetMinTlsVersion() TLSVersion {
	if x != nil && x.MinTlsVersion != nil {
		return *x.MinTlsVersion
	}
	return TLSVersion_TLS_AUTO
}

func (x *TLSConfig) GetMaxTlsVersion() TLSVersion {
	if x != nil && x.MaxTlsVersion != nil {
		return *x.MaxTlsVersion
	}
	return TLSVersion_TLS_AUTO
}

func (x *TLSConfig) GetReloadIntervalSec() int32 {
	if x != nil && x.ReloadIntervalSec != nil {
		return *x.ReloadIntervalSec
	}
	return 0
}

var File_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto protoreflect.FileDescriptor

const file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDesc = "" +
	"\n" +
	"Fgithub.com/cloudprober/cloudprober/common/tlsconfig/proto/config.proto\x12\x15cloudprober.tlsconfig\"\x92\x03\n" +
	"\tTLSConfig\x12 \n" +
	"\fca_cert_file\x18\x01 \x01(\tR\n" +
	"caCertFile\x12\"\n" +
	"\rtls_cert_file\x18\x02 \x01(\tR\vtlsCertFile\x12 \n" +
	"\ftls_key_file\x18\x03 \x01(\tR\n" +
	"tlsKeyFile\x126\n" +
	"\x17disable_cert_validation\x18\x04 \x01(\bR\x15disableCertValidation\x12\x1f\n" +
	"\vserver_name\x18\x05 \x01(\tR\n" +
	"serverName\x12I\n" +
	"\x0fmin_tls_version\x18\a \x01(\x0e2!.cloudprober.tlsconfig.TLSVersionR\rminTlsVersion\x12I\n" +
	"\x0fmax_tls_version\x18\b \x01(\x0e2!.cloudprober.tlsconfig.TLSVersionR\rmaxTlsVersion\x12.\n" +
	"\x13reload_interval_sec\x18\x06 \x01(\x05R\x11reloadIntervalSec*N\n" +
	"\n" +
	"TLSVersion\x12\f\n" +
	"\bTLS_AUTO\x10\x00\x12\v\n" +
	"\aTLS_1_0\x10\x01\x12\v\n" +
	"\aTLS_1_1\x10\x02\x12\v\n" +
	"\aTLS_1_2\x10\x03\x12\v\n" +
	"\aTLS_1_3\x10\x04B;Z9github.com/cloudprober/cloudprober/common/tlsconfig/proto"

var (
	file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDescOnce sync.Once
	file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDescData []byte
)

func file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDescGZIP() []byte {
	file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDescOnce.Do(func() {
		file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDesc), len(file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDesc)))
	})
	return file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDescData
}

var file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_goTypes = []any{
	(TLSVersion)(0),   // 0: cloudprober.tlsconfig.TLSVersion
	(*TLSConfig)(nil), // 1: cloudprober.tlsconfig.TLSConfig
}
var file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_depIdxs = []int32{
	0, // 0: cloudprober.tlsconfig.TLSConfig.min_tls_version:type_name -> cloudprober.tlsconfig.TLSVersion
	0, // 1: cloudprober.tlsconfig.TLSConfig.max_tls_version:type_name -> cloudprober.tlsconfig.TLSVersion
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_init() }
func file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_init() {
	if File_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDesc), len(file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_rawDesc)),
			NumEnums:      1,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_goTypes,
		DependencyIndexes: file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_depIdxs,
		EnumInfos:         file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_enumTypes,
		MessageInfos:      file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_msgTypes,
	}.Build()
	File_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto = out.File
	file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_goTypes = nil
	file_github_com_cloudprober_cloudprober_common_tlsconfig_proto_config_proto_depIdxs = nil
}
