// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.10
// 	protoc        v6.33.2
// source: contrib/envoy/extensions/filters/http/checksum/v3alpha/checksum.proto

package v3alpha

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	_ "github.com/cncf/xds/go/xds/annotations/v3"
	v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
	_ "github.com/envoyproxy/protoc-gen-validate/validate"
	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 ChecksumConfig struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// A set of matcher and checksum pairs for which, if a path matching “path_matcher“
	// is requested and the checksum of the response body does not match the “sha256“, the
	// response will be replaced with a 403 Forbidden status.
	//
	// If multiple matchers match the same path, the first to match takes precedence.
	Checksums []*ChecksumConfig_Checksum `protobuf:"bytes,1,rep,name=checksums,proto3" json:"checksums,omitempty"`
	// If a request doesn't match any of the specified checksum paths and reject_unmatched is
	// true, the request is rejected immediately with 403 Forbidden.
	RejectUnmatched bool `protobuf:"varint,2,opt,name=reject_unmatched,json=rejectUnmatched,proto3" json:"reject_unmatched,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*ChecksumConfig) ProtoMessage() {}

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

func (x *ChecksumConfig) GetChecksums() []*ChecksumConfig_Checksum {
	if x != nil {
		return x.Checksums
	}
	return nil
}

func (x *ChecksumConfig) GetRejectUnmatched() bool {
	if x != nil {
		return x.RejectUnmatched
	}
	return false
}

type ChecksumConfig_Checksum struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Matcher:
	//
	//	*ChecksumConfig_Checksum_PathMatcher
	Matcher isChecksumConfig_Checksum_Matcher `protobuf_oneof:"matcher"`
	// A hex-encoded sha256 string required to match the sha256sum of the response body
	// of the path specified in the “path_matcher“ field.
	Sha256        string `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*ChecksumConfig_Checksum) ProtoMessage() {}

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

func (x *ChecksumConfig_Checksum) GetMatcher() isChecksumConfig_Checksum_Matcher {
	if x != nil {
		return x.Matcher
	}
	return nil
}

func (x *ChecksumConfig_Checksum) GetPathMatcher() *v3.StringMatcher {
	if x != nil {
		if x, ok := x.Matcher.(*ChecksumConfig_Checksum_PathMatcher); ok {
			return x.PathMatcher
		}
	}
	return nil
}

func (x *ChecksumConfig_Checksum) GetSha256() string {
	if x != nil {
		return x.Sha256
	}
	return ""
}

type isChecksumConfig_Checksum_Matcher interface {
	isChecksumConfig_Checksum_Matcher()
}

type ChecksumConfig_Checksum_PathMatcher struct {
	// A matcher for a path that is expected to have a specific checksum, as specified
	// in the “sha256“ field.
	PathMatcher *v3.StringMatcher `protobuf:"bytes,1,opt,name=path_matcher,json=pathMatcher,proto3,oneof"`
}

func (*ChecksumConfig_Checksum_PathMatcher) isChecksumConfig_Checksum_Matcher() {}

var File_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto protoreflect.FileDescriptor

const file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDesc = "" +
	"\n" +
	"Econtrib/envoy/extensions/filters/http/checksum/v3alpha/checksum.proto\x12.envoy.extensions.filters.http.checksum.v3alpha\x1a\"envoy/type/matcher/v3/string.proto\x1a\x1fxds/annotations/v3/status.proto\x1a\x1dudpa/annotations/status.proto\x1a\x17validate/validate.proto\"\xc0\x02\n" +
	"\x0eChecksumConfig\x12e\n" +
	"\tchecksums\x18\x01 \x03(\v2G.envoy.extensions.filters.http.checksum.v3alpha.ChecksumConfig.ChecksumR\tchecksums\x12)\n" +
	"\x10reject_unmatched\x18\x02 \x01(\bR\x0frejectUnmatched\x1a\x9b\x01\n" +
	"\bChecksum\x12S\n" +
	"\fpath_matcher\x18\x01 \x01(\v2$.envoy.type.matcher.v3.StringMatcherB\b\xfaB\x05\x8a\x01\x02\x10\x01H\x00R\vpathMatcher\x12/\n" +
	"\x06sha256\x18\x02 \x01(\tB\x17\xfaB\x14r\x122\x10^[a-fA-F0-9]{64}R\x06sha256B\t\n" +
	"\amatcherB\xbe\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\xd2Ƥ\xe1\x06\x02\b\x01\n" +
	"<io.envoyproxy.envoy.extensions.filters.http.checksum.v3alphaB\rChecksumProtoP\x01Z]github.com/envoyproxy/go-control-plane/contrib/envoy/extensions/filters/http/checksum/v3alphab\x06proto3"

var (
	file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDescOnce sync.Once
	file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDescData []byte
)

func file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDescGZIP() []byte {
	file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDescOnce.Do(func() {
		file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDesc), len(file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDesc)))
	})
	return file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDescData
}

var file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_goTypes = []any{
	(*ChecksumConfig)(nil),          // 0: envoy.extensions.filters.http.checksum.v3alpha.ChecksumConfig
	(*ChecksumConfig_Checksum)(nil), // 1: envoy.extensions.filters.http.checksum.v3alpha.ChecksumConfig.Checksum
	(*v3.StringMatcher)(nil),        // 2: envoy.type.matcher.v3.StringMatcher
}
var file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.filters.http.checksum.v3alpha.ChecksumConfig.checksums:type_name -> envoy.extensions.filters.http.checksum.v3alpha.ChecksumConfig.Checksum
	2, // 1: envoy.extensions.filters.http.checksum.v3alpha.ChecksumConfig.Checksum.path_matcher:type_name -> envoy.type.matcher.v3.StringMatcher
	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_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_init() }
func file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_init() {
	if File_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto != nil {
		return
	}
	file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_msgTypes[1].OneofWrappers = []any{
		(*ChecksumConfig_Checksum_PathMatcher)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDesc), len(file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_goTypes,
		DependencyIndexes: file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_depIdxs,
		MessageInfos:      file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_msgTypes,
	}.Build()
	File_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto = out.File
	file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_goTypes = nil
	file_contrib_envoy_extensions_filters_http_checksum_v3alpha_checksum_proto_depIdxs = nil
}
