// 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/rbac/v3/rbac.proto

package rbacv3

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

// RBAC filter config.
// [#next-free-field: 8]
type RBAC struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The primary RBAC policy which will be applied globally, to all the incoming requests.
	//
	// * If absent, no RBAC enforcement occurs.
	// * If set but empty, all requests are denied.
	//
	// .. note::
	//
	//	When both ``rules`` and ``matcher`` are configured, ``rules`` will be ignored.
	Rules *v3.RBAC `protobuf:"bytes,1,opt,name=rules,proto3" json:"rules,omitempty"`
	// If specified, rules will emit stats with the given prefix.
	// This is useful for distinguishing metrics when multiple RBAC filters are configured.
	RulesStatPrefix string `protobuf:"bytes,6,opt,name=rules_stat_prefix,json=rulesStatPrefix,proto3" json:"rules_stat_prefix,omitempty"`
	// Match tree for evaluating RBAC actions on incoming requests. Requests not matching any matcher will be denied.
	//
	// * If absent, no RBAC enforcement occurs.
	// * If set but empty, all requests are denied.
	Matcher *v31.Matcher `protobuf:"bytes,4,opt,name=matcher,proto3" json:"matcher,omitempty"`
	// Shadow policy for testing RBAC rules without enforcing them. These rules generate stats and logs but do not deny
	// requests. If absent, no shadow RBAC policy will be applied.
	//
	// .. note::
	//
	//	When both ``shadow_rules`` and ``shadow_matcher`` are configured, ``shadow_rules`` will be ignored.
	ShadowRules *v3.RBAC `protobuf:"bytes,2,opt,name=shadow_rules,json=shadowRules,proto3" json:"shadow_rules,omitempty"`
	// If absent, no shadow matcher will be applied.
	// Match tree for testing RBAC rules through stats and logs without enforcing them.
	// If absent, no shadow matching occurs.
	ShadowMatcher *v31.Matcher `protobuf:"bytes,5,opt,name=shadow_matcher,json=shadowMatcher,proto3" json:"shadow_matcher,omitempty"`
	// If specified, shadow rules will emit stats with the given prefix.
	// This is useful for distinguishing metrics when multiple RBAC filters use shadow rules.
	ShadowRulesStatPrefix string `protobuf:"bytes,3,opt,name=shadow_rules_stat_prefix,json=shadowRulesStatPrefix,proto3" json:"shadow_rules_stat_prefix,omitempty"`
	// If “track_per_rule_stats“ is “true“, counters will be published for each rule and shadow rule.
	TrackPerRuleStats bool `protobuf:"varint,7,opt,name=track_per_rule_stats,json=trackPerRuleStats,proto3" json:"track_per_rule_stats,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

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

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

func (*RBAC) ProtoMessage() {}

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

func (x *RBAC) GetRules() *v3.RBAC {
	if x != nil {
		return x.Rules
	}
	return nil
}

func (x *RBAC) GetRulesStatPrefix() string {
	if x != nil {
		return x.RulesStatPrefix
	}
	return ""
}

func (x *RBAC) GetMatcher() *v31.Matcher {
	if x != nil {
		return x.Matcher
	}
	return nil
}

func (x *RBAC) GetShadowRules() *v3.RBAC {
	if x != nil {
		return x.ShadowRules
	}
	return nil
}

func (x *RBAC) GetShadowMatcher() *v31.Matcher {
	if x != nil {
		return x.ShadowMatcher
	}
	return nil
}

func (x *RBAC) GetShadowRulesStatPrefix() string {
	if x != nil {
		return x.ShadowRulesStatPrefix
	}
	return ""
}

func (x *RBAC) GetTrackPerRuleStats() bool {
	if x != nil {
		return x.TrackPerRuleStats
	}
	return false
}

type RBACPerRoute struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Per-route specific RBAC configuration that overrides the global RBAC configuration.
	// If absent, RBAC policy will be disabled for this route.
	Rbac          *RBAC `protobuf:"bytes,2,opt,name=rbac,proto3" json:"rbac,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*RBACPerRoute) ProtoMessage() {}

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

func (x *RBACPerRoute) GetRbac() *RBAC {
	if x != nil {
		return x.Rbac
	}
	return nil
}

var File_envoy_extensions_filters_http_rbac_v3_rbac_proto protoreflect.FileDescriptor

const file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc = "" +
	"\n" +
	"0envoy/extensions/filters/http/rbac/v3/rbac.proto\x12%envoy.extensions.filters.http.rbac.v3\x1a\x1fenvoy/config/rbac/v3/rbac.proto\x1a!xds/type/matcher/v3/matcher.proto\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\"\xaa\x04\n" +
	"\x04RBAC\x12I\n" +
	"\x05rules\x18\x01 \x01(\v2\x1a.envoy.config.rbac.v3.RBACB\x17\xf2\x98\xfe\x8f\x05\x11\x12\x0frules_specifierR\x05rules\x12*\n" +
	"\x11rules_stat_prefix\x18\x06 \x01(\tR\x0frulesStatPrefix\x12O\n" +
	"\amatcher\x18\x04 \x01(\v2\x1c.xds.type.matcher.v3.MatcherB\x17\xf2\x98\xfe\x8f\x05\x11\x12\x0frules_specifierR\amatcher\x12]\n" +
	"\fshadow_rules\x18\x02 \x01(\v2\x1a.envoy.config.rbac.v3.RBACB\x1e\xf2\x98\xfe\x8f\x05\x18\x12\x16shadow_rules_specifierR\vshadowRules\x12c\n" +
	"\x0eshadow_matcher\x18\x05 \x01(\v2\x1c.xds.type.matcher.v3.MatcherB\x1e\xf2\x98\xfe\x8f\x05\x18\x12\x16shadow_rules_specifierR\rshadowMatcher\x127\n" +
	"\x18shadow_rules_stat_prefix\x18\x03 \x01(\tR\x15shadowRulesStatPrefix\x12/\n" +
	"\x14track_per_rule_stats\x18\a \x01(\bR\x11trackPerRuleStats:,\x9aň\x1e'\n" +
	"%envoy.config.filter.http.rbac.v2.RBAC\"\x8b\x01\n" +
	"\fRBACPerRoute\x12?\n" +
	"\x04rbac\x18\x02 \x01(\v2+.envoy.extensions.filters.http.rbac.v3.RBACR\x04rbac:4\x9aň\x1e/\n" +
	"-envoy.config.filter.http.rbac.v2.RBACPerRouteJ\x04\b\x01\x10\x02B\x9f\x01\xba\x80\xc8\xd1\x06\x02\x10\x02\n" +
	"3io.envoyproxy.envoy.extensions.filters.http.rbac.v3B\tRbacProtoP\x01ZSgithub.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/rbac/v3;rbacv3b\x06proto3"

var (
	file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescOnce sync.Once
	file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescData []byte
)

func file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescGZIP() []byte {
	file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescOnce.Do(func() {
		file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc), len(file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc)))
	})
	return file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDescData
}

var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_goTypes = []any{
	(*RBAC)(nil),         // 0: envoy.extensions.filters.http.rbac.v3.RBAC
	(*RBACPerRoute)(nil), // 1: envoy.extensions.filters.http.rbac.v3.RBACPerRoute
	(*v3.RBAC)(nil),      // 2: envoy.config.rbac.v3.RBAC
	(*v31.Matcher)(nil),  // 3: xds.type.matcher.v3.Matcher
}
var file_envoy_extensions_filters_http_rbac_v3_rbac_proto_depIdxs = []int32{
	2, // 0: envoy.extensions.filters.http.rbac.v3.RBAC.rules:type_name -> envoy.config.rbac.v3.RBAC
	3, // 1: envoy.extensions.filters.http.rbac.v3.RBAC.matcher:type_name -> xds.type.matcher.v3.Matcher
	2, // 2: envoy.extensions.filters.http.rbac.v3.RBAC.shadow_rules:type_name -> envoy.config.rbac.v3.RBAC
	3, // 3: envoy.extensions.filters.http.rbac.v3.RBAC.shadow_matcher:type_name -> xds.type.matcher.v3.Matcher
	0, // 4: envoy.extensions.filters.http.rbac.v3.RBACPerRoute.rbac:type_name -> envoy.extensions.filters.http.rbac.v3.RBAC
	5, // [5:5] is the sub-list for method output_type
	5, // [5:5] is the sub-list for method input_type
	5, // [5:5] is the sub-list for extension type_name
	5, // [5:5] is the sub-list for extension extendee
	0, // [0:5] is the sub-list for field type_name
}

func init() { file_envoy_extensions_filters_http_rbac_v3_rbac_proto_init() }
func file_envoy_extensions_filters_http_rbac_v3_rbac_proto_init() {
	if File_envoy_extensions_filters_http_rbac_v3_rbac_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_rbac_v3_rbac_proto_rawDesc), len(file_envoy_extensions_filters_http_rbac_v3_rbac_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_envoy_extensions_filters_http_rbac_v3_rbac_proto_goTypes,
		DependencyIndexes: file_envoy_extensions_filters_http_rbac_v3_rbac_proto_depIdxs,
		MessageInfos:      file_envoy_extensions_filters_http_rbac_v3_rbac_proto_msgTypes,
	}.Build()
	File_envoy_extensions_filters_http_rbac_v3_rbac_proto = out.File
	file_envoy_extensions_filters_http_rbac_v3_rbac_proto_goTypes = nil
	file_envoy_extensions_filters_http_rbac_v3_rbac_proto_depIdxs = nil
}
