// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: yandex/cloud/loadbalancer/v1/health_check.proto

package loadbalancer

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	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)
)

// A HealthCheck resource. For more information, see [Health check](/docs/network-load-balancer/concepts/health-check).
type HealthCheck struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the health check. The name must be unique for each target group that attached to a single load balancer. 3-63 characters long.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The interval between health checks. The default is 2 seconds.
	Interval *durationpb.Duration `protobuf:"bytes,2,opt,name=interval,proto3" json:"interval,omitempty"`
	// Timeout for a target to return a response for the health check. The default is 1 second.
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// Number of failed health checks before changing the status to “ UNHEALTHY “. The default is 2.
	UnhealthyThreshold int64 `protobuf:"varint,4,opt,name=unhealthy_threshold,json=unhealthyThreshold,proto3" json:"unhealthy_threshold,omitempty"`
	// Number of successful health checks required in order to set the “ HEALTHY “ status for the target. The default is 2.
	HealthyThreshold int64 `protobuf:"varint,5,opt,name=healthy_threshold,json=healthyThreshold,proto3" json:"healthy_threshold,omitempty"`
	// Protocol to use for the health check. Either TCP or HTTP.
	//
	// Types that are valid to be assigned to Options:
	//
	//	*HealthCheck_TcpOptions_
	//	*HealthCheck_HttpOptions_
	Options       isHealthCheck_Options `protobuf_oneof:"options"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*HealthCheck) ProtoMessage() {}

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

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

func (x *HealthCheck) GetInterval() *durationpb.Duration {
	if x != nil {
		return x.Interval
	}
	return nil
}

func (x *HealthCheck) GetTimeout() *durationpb.Duration {
	if x != nil {
		return x.Timeout
	}
	return nil
}

func (x *HealthCheck) GetUnhealthyThreshold() int64 {
	if x != nil {
		return x.UnhealthyThreshold
	}
	return 0
}

func (x *HealthCheck) GetHealthyThreshold() int64 {
	if x != nil {
		return x.HealthyThreshold
	}
	return 0
}

func (x *HealthCheck) GetOptions() isHealthCheck_Options {
	if x != nil {
		return x.Options
	}
	return nil
}

func (x *HealthCheck) GetTcpOptions() *HealthCheck_TcpOptions {
	if x != nil {
		if x, ok := x.Options.(*HealthCheck_TcpOptions_); ok {
			return x.TcpOptions
		}
	}
	return nil
}

func (x *HealthCheck) GetHttpOptions() *HealthCheck_HttpOptions {
	if x != nil {
		if x, ok := x.Options.(*HealthCheck_HttpOptions_); ok {
			return x.HttpOptions
		}
	}
	return nil
}

type isHealthCheck_Options interface {
	isHealthCheck_Options()
}

type HealthCheck_TcpOptions_ struct {
	// Options for TCP health check.
	TcpOptions *HealthCheck_TcpOptions `protobuf:"bytes,6,opt,name=tcp_options,json=tcpOptions,proto3,oneof"`
}

type HealthCheck_HttpOptions_ struct {
	// Options for HTTP health check.
	HttpOptions *HealthCheck_HttpOptions `protobuf:"bytes,7,opt,name=http_options,json=httpOptions,proto3,oneof"`
}

func (*HealthCheck_TcpOptions_) isHealthCheck_Options() {}

func (*HealthCheck_HttpOptions_) isHealthCheck_Options() {}

// Configuration option for a TCP health check.
type HealthCheck_TcpOptions struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Port to use for TCP health checks.
	Port          int64 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*HealthCheck_TcpOptions) ProtoMessage() {}

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

func (x *HealthCheck_TcpOptions) GetPort() int64 {
	if x != nil {
		return x.Port
	}
	return 0
}

// Configuration option for an HTTP health check.
type HealthCheck_HttpOptions struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Port to use for HTTP health checks.
	Port int64 `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	// URL path to set for health checking requests for every target in the target group.
	// For example “ /ping “. The default path is “ / “.
	Path          string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *HealthCheck_HttpOptions) Reset() {
	*x = HealthCheck_HttpOptions{}
	mi := &file_yandex_cloud_loadbalancer_v1_health_check_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*HealthCheck_HttpOptions) ProtoMessage() {}

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

func (x *HealthCheck_HttpOptions) GetPort() int64 {
	if x != nil {
		return x.Port
	}
	return 0
}

func (x *HealthCheck_HttpOptions) GetPath() string {
	if x != nil {
		return x.Path
	}
	return ""
}

var File_yandex_cloud_loadbalancer_v1_health_check_proto protoreflect.FileDescriptor

const file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDesc = "" +
	"\n" +
	"/yandex/cloud/loadbalancer/v1/health_check.proto\x12\x1cyandex.cloud.loadbalancer.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1dyandex/cloud/validation.proto\"\xdf\x04\n" +
	"\vHealthCheck\x129\n" +
	"\x04name\x18\x01 \x01(\tB%\xe8\xc71\x01\xf2\xc71\x1d|[a-z][-a-z0-9]{1,61}[a-z0-9]R\x04name\x125\n" +
	"\binterval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\binterval\x123\n" +
	"\atimeout\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\atimeout\x129\n" +
	"\x13unhealthy_threshold\x18\x04 \x01(\x03B\b\xfa\xc71\x042-10R\x12unhealthyThreshold\x125\n" +
	"\x11healthy_threshold\x18\x05 \x01(\x03B\b\xfa\xc71\x042-10R\x10healthyThreshold\x12W\n" +
	"\vtcp_options\x18\x06 \x01(\v24.yandex.cloud.loadbalancer.v1.HealthCheck.TcpOptionsH\x00R\n" +
	"tcpOptions\x12Z\n" +
	"\fhttp_options\x18\a \x01(\v25.yandex.cloud.loadbalancer.v1.HealthCheck.HttpOptionsH\x00R\vhttpOptions\x1a-\n" +
	"\n" +
	"TcpOptions\x12\x1f\n" +
	"\x04port\x18\x01 \x01(\x03B\v\xfa\xc71\a1-65535R\x04port\x1aB\n" +
	"\vHttpOptions\x12\x1f\n" +
	"\x04port\x18\x01 \x01(\x03B\v\xfa\xc71\a1-65535R\x04port\x12\x12\n" +
	"\x04path\x18\x02 \x01(\tR\x04pathB\x0f\n" +
	"\aoptions\x12\x04\xc0\xc11\x01Bq\n" +
	" yandex.cloud.api.loadbalancer.v1ZMgithub.com/yandex-cloud/go-genproto/yandex/cloud/loadbalancer/v1;loadbalancerb\x06proto3"

var (
	file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDescOnce sync.Once
	file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDescData []byte
)

func file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDescGZIP() []byte {
	file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDesc), len(file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDesc)))
	})
	return file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDescData
}

var file_yandex_cloud_loadbalancer_v1_health_check_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_yandex_cloud_loadbalancer_v1_health_check_proto_goTypes = []any{
	(*HealthCheck)(nil),             // 0: yandex.cloud.loadbalancer.v1.HealthCheck
	(*HealthCheck_TcpOptions)(nil),  // 1: yandex.cloud.loadbalancer.v1.HealthCheck.TcpOptions
	(*HealthCheck_HttpOptions)(nil), // 2: yandex.cloud.loadbalancer.v1.HealthCheck.HttpOptions
	(*durationpb.Duration)(nil),     // 3: google.protobuf.Duration
}
var file_yandex_cloud_loadbalancer_v1_health_check_proto_depIdxs = []int32{
	3, // 0: yandex.cloud.loadbalancer.v1.HealthCheck.interval:type_name -> google.protobuf.Duration
	3, // 1: yandex.cloud.loadbalancer.v1.HealthCheck.timeout:type_name -> google.protobuf.Duration
	1, // 2: yandex.cloud.loadbalancer.v1.HealthCheck.tcp_options:type_name -> yandex.cloud.loadbalancer.v1.HealthCheck.TcpOptions
	2, // 3: yandex.cloud.loadbalancer.v1.HealthCheck.http_options:type_name -> yandex.cloud.loadbalancer.v1.HealthCheck.HttpOptions
	4, // [4:4] is the sub-list for method output_type
	4, // [4:4] is the sub-list for method input_type
	4, // [4:4] is the sub-list for extension type_name
	4, // [4:4] is the sub-list for extension extendee
	0, // [0:4] is the sub-list for field type_name
}

func init() { file_yandex_cloud_loadbalancer_v1_health_check_proto_init() }
func file_yandex_cloud_loadbalancer_v1_health_check_proto_init() {
	if File_yandex_cloud_loadbalancer_v1_health_check_proto != nil {
		return
	}
	file_yandex_cloud_loadbalancer_v1_health_check_proto_msgTypes[0].OneofWrappers = []any{
		(*HealthCheck_TcpOptions_)(nil),
		(*HealthCheck_HttpOptions_)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDesc), len(file_yandex_cloud_loadbalancer_v1_health_check_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_loadbalancer_v1_health_check_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_loadbalancer_v1_health_check_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_loadbalancer_v1_health_check_proto_msgTypes,
	}.Build()
	File_yandex_cloud_loadbalancer_v1_health_check_proto = out.File
	file_yandex_cloud_loadbalancer_v1_health_check_proto_goTypes = nil
	file_yandex_cloud_loadbalancer_v1_health_check_proto_depIdxs = nil
}
