// 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/http/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)
)

// HTTP validator configuration. For HTTP validator to succeed, all conditions
// specified in the validator should succeed. Note that failures conditions are
// evaluated before success conditions.
type Validator struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Comma-separated list of success status codes and code ranges.
	// Example: success_stauts_codes: 200-299,301,302
	SuccessStatusCodes *string `protobuf:"bytes,1,opt,name=success_status_codes,json=successStatusCodes,proto3,oneof" json:"success_status_codes,omitempty"`
	// Comma-separated list of failure status codes and code ranges. If HTTP
	// status code matches failure_status_codes, validator fails.
	FailureStatusCodes *string `protobuf:"bytes,2,opt,name=failure_status_codes,json=failureStatusCodes,proto3,oneof" json:"failure_status_codes,omitempty"`
	// Header based validations.
	// TODO(manugarg): Add support for specifying multiple success and failure
	// headers.
	//
	// Success Header:
	//
	//	If specified, HTTP response headers should match the success_header for
	//	validation to succeed. Example:
	//	  success_header: {
	//	    name: "Strict-Transport-Security"
	//	    value_regex: "max-age=31536000"
	//	  }
	SuccessHeader *Validator_Header `protobuf:"bytes,3,opt,name=success_header,json=successHeader,proto3,oneof" json:"success_header,omitempty"`
	// Failure Header:
	//
	//	If HTTP response headers match failure_header, validation fails.
	FailureHeader *Validator_Header `protobuf:"bytes,4,opt,name=failure_header,json=failureHeader,proto3,oneof" json:"failure_header,omitempty"`
	// Last Modified Difference:
	//
	//	If specified, HTTP response's Last-Modified header is checked to be
	//	within the specified time difference from the current time. Example:
	//	  max_last_modified_diff_sec: 3600
	//	This will check that the Last-Modified header is within the last hour.
	MaxLastModifiedDiffSec uint64 `protobuf:"varint,5,opt,name=max_last_modified_diff_sec,json=maxLastModifiedDiffSec,proto3" json:"max_last_modified_diff_sec,omitempty"`
	unknownFields          protoimpl.UnknownFields
	sizeCache              protoimpl.SizeCache
}

func (x *Validator) Reset() {
	*x = Validator{}
	mi := &file_github_com_cloudprober_cloudprober_internal_validators_http_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_http_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_http_proto_config_proto_rawDescGZIP(), []int{0}
}

func (x *Validator) GetSuccessStatusCodes() string {
	if x != nil && x.SuccessStatusCodes != nil {
		return *x.SuccessStatusCodes
	}
	return ""
}

func (x *Validator) GetFailureStatusCodes() string {
	if x != nil && x.FailureStatusCodes != nil {
		return *x.FailureStatusCodes
	}
	return ""
}

func (x *Validator) GetSuccessHeader() *Validator_Header {
	if x != nil {
		return x.SuccessHeader
	}
	return nil
}

func (x *Validator) GetFailureHeader() *Validator_Header {
	if x != nil {
		return x.FailureHeader
	}
	return nil
}

func (x *Validator) GetMaxLastModifiedDiffSec() uint64 {
	if x != nil {
		return x.MaxLastModifiedDiffSec
	}
	return 0
}

type Validator_Header struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Header name to look for
	Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// Header value to match. If omited - check for header existence
	ValueRegex    *string `protobuf:"bytes,2,opt,name=value_regex,json=valueRegex,proto3,oneof" json:"value_regex,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Validator_Header) ProtoMessage() {}

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

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

func (x *Validator_Header) GetValueRegex() string {
	if x != nil && x.ValueRegex != nil {
		return *x.ValueRegex
	}
	return ""
}

var File_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto protoreflect.FileDescriptor

const file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDesc = "" +
	"\n" +
	"Ngithub.com/cloudprober/cloudprober/internal/validators/http/proto/config.proto\x12\x1bcloudprober.validators.http\"\xa5\x04\n" +
	"\tValidator\x125\n" +
	"\x14success_status_codes\x18\x01 \x01(\tH\x00R\x12successStatusCodes\x88\x01\x01\x125\n" +
	"\x14failure_status_codes\x18\x02 \x01(\tH\x01R\x12failureStatusCodes\x88\x01\x01\x12Y\n" +
	"\x0esuccess_header\x18\x03 \x01(\v2-.cloudprober.validators.http.Validator.HeaderH\x02R\rsuccessHeader\x88\x01\x01\x12Y\n" +
	"\x0efailure_header\x18\x04 \x01(\v2-.cloudprober.validators.http.Validator.HeaderH\x03R\rfailureHeader\x88\x01\x01\x12:\n" +
	"\x1amax_last_modified_diff_sec\x18\x05 \x01(\x04R\x16maxLastModifiedDiffSec\x1a`\n" +
	"\x06Header\x12\x17\n" +
	"\x04name\x18\x01 \x01(\tH\x00R\x04name\x88\x01\x01\x12$\n" +
	"\vvalue_regex\x18\x02 \x01(\tH\x01R\n" +
	"valueRegex\x88\x01\x01B\a\n" +
	"\x05_nameB\x0e\n" +
	"\f_value_regexB\x17\n" +
	"\x15_success_status_codesB\x17\n" +
	"\x15_failure_status_codesB\x11\n" +
	"\x0f_success_headerB\x11\n" +
	"\x0f_failure_headerBCZAgithub.com/cloudprober/cloudprober/internal/validators/http/protob\x06proto3"

var (
	file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDescOnce sync.Once
	file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDescData []byte
)

func file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDescGZIP() []byte {
	file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDescOnce.Do(func() {
		file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDesc), len(file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDesc)))
	})
	return file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDescData
}

var file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_goTypes = []any{
	(*Validator)(nil),        // 0: cloudprober.validators.http.Validator
	(*Validator_Header)(nil), // 1: cloudprober.validators.http.Validator.Header
}
var file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_depIdxs = []int32{
	1, // 0: cloudprober.validators.http.Validator.success_header:type_name -> cloudprober.validators.http.Validator.Header
	1, // 1: cloudprober.validators.http.Validator.failure_header:type_name -> cloudprober.validators.http.Validator.Header
	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_internal_validators_http_proto_config_proto_init()
}
func file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_init() {
	if File_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto != nil {
		return
	}
	file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_msgTypes[0].OneofWrappers = []any{}
	file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_msgTypes[1].OneofWrappers = []any{}
	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_http_proto_config_proto_rawDesc), len(file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_goTypes,
		DependencyIndexes: file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_depIdxs,
		MessageInfos:      file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_msgTypes,
	}.Build()
	File_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto = out.File
	file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_goTypes = nil
	file_github_com_cloudprober_cloudprober_internal_validators_http_proto_config_proto_depIdxs = nil
}
