// 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/internal/validators/integrity/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 Validator struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Validate the data integrity of the response using a pattern that is
	// repeated throughout the length of the response, with last len(response) %
	// len(pattern) bytes being zero bytes.
	//
	// For example if response length is 100 bytes and pattern length is 8 bytes,
	// first 96 bytes of the response should be pattern repeated 12 times, and
	// last 4 bytes should be set to zero byte ('\0')
	//
	// Types that are valid to be assigned to Pattern:
	//
	//	*Validator_PatternString
	//	*Validator_PatternNumBytes
	Pattern       isValidator_Pattern `protobuf_oneof:"pattern"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Validator) ProtoMessage() {}

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

func (x *Validator) GetPattern() isValidator_Pattern {
	if x != nil {
		return x.Pattern
	}
	return nil
}

func (x *Validator) GetPatternString() string {
	if x != nil {
		if x, ok := x.Pattern.(*Validator_PatternString); ok {
			return x.PatternString
		}
	}
	return ""
}

func (x *Validator) GetPatternNumBytes() int32 {
	if x != nil {
		if x, ok := x.Pattern.(*Validator_PatternNumBytes); ok {
			return x.PatternNumBytes
		}
	}
	return 0
}

type isValidator_Pattern interface {
	isValidator_Pattern()
}

type Validator_PatternString struct {
	// Pattern string for pattern repetition based integrity checks.
	// For example, cloudprobercloudprobercloudprober...
	PatternString string `protobuf:"bytes,1,opt,name=pattern_string,json=patternString,proto3,oneof"`
}

type Validator_PatternNumBytes struct {
	// Pattern is derived from the first few bytes of the payload. This is
	// useful when pattern is not known in advance, for example cloudprober's
	// ping probe repeates the timestamp (8 bytes) in the packet payload.
	// An error is returned if response is smaller than pattern_num_bytes.
	PatternNumBytes int32 `protobuf:"varint,2,opt,name=pattern_num_bytes,json=patternNumBytes,proto3,oneof"`
}

func (*Validator_PatternString) isValidator_Pattern() {}

func (*Validator_PatternNumBytes) isValidator_Pattern() {}

var File_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto protoreflect.FileDescriptor

const file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDesc = "" +
	"\n" +
	"Sgithub.com/cloudprober/cloudprober/internal/validators/integrity/proto/config.proto\x12 cloudprober.validators.integrity\"m\n" +
	"\tValidator\x12'\n" +
	"\x0epattern_string\x18\x01 \x01(\tH\x00R\rpatternString\x12,\n" +
	"\x11pattern_num_bytes\x18\x02 \x01(\x05H\x00R\x0fpatternNumBytesB\t\n" +
	"\apatternBHZFgithub.com/cloudprober/cloudprober/internal/validators/integrity/protob\x06proto3"

var (
	file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDescOnce sync.Once
	file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDescData []byte
)

func file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDescGZIP() []byte {
	file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDescOnce.Do(func() {
		file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDesc), len(file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDesc)))
	})
	return file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDescData
}

var file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_goTypes = []any{
	(*Validator)(nil), // 0: cloudprober.validators.integrity.Validator
}
var file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_depIdxs = []int32{
	0, // [0:0] is the sub-list for method output_type
	0, // [0:0] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() {
	file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_init()
}
func file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_init() {
	if File_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto != nil {
		return
	}
	file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_msgTypes[0].OneofWrappers = []any{
		(*Validator_PatternString)(nil),
		(*Validator_PatternNumBytes)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDesc), len(file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_goTypes,
		DependencyIndexes: file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_depIdxs,
		MessageInfos:      file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_msgTypes,
	}.Build()
	File_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto = out.File
	file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_goTypes = nil
	file_github_com_cloudprober_cloudprober_internal_validators_integrity_proto_config_proto_depIdxs = nil
}
