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

package csrfv3

import (
	_ "github.com/cncf/xds/go/udpa/annotations"
	v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
	v31 "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)
)

// CSRF filter config.
type CsrfPolicy struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Specifies the % of requests for which the CSRF filter is enabled.
	//
	// If :ref:`runtime_key <envoy_v3_api_field_config.core.v3.RuntimeFractionalPercent.runtime_key>` is specified,
	// Envoy will lookup the runtime key to get the percentage of requests to filter.
	//
	// .. note::
	//
	//	This field defaults to 100/:ref:`HUNDRED
	//	<envoy_v3_api_enum_type.v3.FractionalPercent.DenominatorType>`.
	FilterEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,1,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"`
	// Specifies that CSRF policies will be evaluated and tracked, but not enforced.
	//
	// This is intended to be used when “filter_enabled“ is off and will be ignored otherwise.
	//
	// If :ref:`runtime_key <envoy_v3_api_field_config.core.v3.RuntimeFractionalPercent.runtime_key>` is specified,
	// Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate
	// and track the request's “Origin“ and “Destination“ to determine if it's valid, but will not
	// enforce any policies.
	ShadowEnabled *v3.RuntimeFractionalPercent `protobuf:"bytes,2,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"`
	// Specifies additional source origins that will be allowed in addition to
	// the destination origin.
	//
	// More information on how this can be configured via runtime can be found
	// :ref:`here <csrf-configuration>`.
	AdditionalOrigins []*v31.StringMatcher `protobuf:"bytes,3,rep,name=additional_origins,json=additionalOrigins,proto3" json:"additional_origins,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*CsrfPolicy) ProtoMessage() {}

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

func (x *CsrfPolicy) GetFilterEnabled() *v3.RuntimeFractionalPercent {
	if x != nil {
		return x.FilterEnabled
	}
	return nil
}

func (x *CsrfPolicy) GetShadowEnabled() *v3.RuntimeFractionalPercent {
	if x != nil {
		return x.ShadowEnabled
	}
	return nil
}

func (x *CsrfPolicy) GetAdditionalOrigins() []*v31.StringMatcher {
	if x != nil {
		return x.AdditionalOrigins
	}
	return nil
}

var File_envoy_extensions_filters_http_csrf_v3_csrf_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc = "" +
	"\n" +
	"0envoy/extensions/filters/http/csrf/v3/csrf.proto\x12%envoy.extensions.filters.http.csrf.v3\x1a\x1fenvoy/config/core/v3/base.proto\x1a\"envoy/type/matcher/v3/string.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\xcd\x02\n" +
	"\n" +
	"CsrfPolicy\x12_\n" +
	"\x0efilter_enabled\x18\x01 \x01(\v2..envoy.config.core.v3.RuntimeFractionalPercentB\b\xfaB\x05\x8a\x01\x02\x10\x01R\rfilterEnabled\x12U\n" +
	"\x0eshadow_enabled\x18\x02 \x01(\v2..envoy.config.core.v3.RuntimeFractionalPercentR\rshadowEnabled\x12S\n" +
	"\x12additional_origins\x18\x03 \x03(\v2$.envoy.type.matcher.v3.StringMatcherR\x11additionalOrigins:2\x9aň\x1e-\n" +
	"+envoy.config.filter.http.csrf.v2.CsrfPolicyB\x9f\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"3io.envoyproxy.envoy.extensions.filters.http.csrf.v3B\tCsrfProtoP\x01ZSgithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/csrf/v3;csrfv3b\x06proto3"

var (
	file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc), len(file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDescData
}

var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_goTypes = []any{
	(*CsrfPolicy)(nil),                  // 0: envoy.extensions.filters.http.csrf.v3.CsrfPolicy
	(*v3.RuntimeFractionalPercent)(nil), // 1: envoy.config.core.v3.RuntimeFractionalPercent
	(*v31.StringMatcher)(nil),           // 2: envoy.type.matcher.v3.StringMatcher
}
var file_envoy_extensions_filters_http_csrf_v3_csrf_proto_depIdxs = []int32{
	1, // 0: envoy.extensions.filters.http.csrf.v3.CsrfPolicy.filter_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent
	1, // 1: envoy.extensions.filters.http.csrf.v3.CsrfPolicy.shadow_enabled:type_name -> envoy.config.core.v3.RuntimeFractionalPercent
	2, // 2: envoy.extensions.filters.http.csrf.v3.CsrfPolicy.additional_origins:type_name -> envoy.type.matcher.v3.StringMatcher
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_envoy_extensions_filters_http_csrf_v3_csrf_proto_init() }
func file_envoy_extensions_filters_http_csrf_v3_csrf_proto_init() {
	if File_envoy_extensions_filters_http_csrf_v3_csrf_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc), len(file_envoy_extensions_filters_http_csrf_v3_csrf_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_csrf_v3_csrf_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_csrf_v3_csrf_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_filters_http_csrf_v3_csrf_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_csrf_v3_csrf_proto = out.File
	file_envoy_extensions_filters_http_csrf_v3_csrf_proto_goTypes = nil
	file_envoy_extensions_filters_http_csrf_v3_csrf_proto_depIdxs = nil
}
