// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.9
// 	protoc        v6.31.1
// source: github.com/buildbarn/bb-storage/pkg/proto/configuration/auth/auth.proto

package auth

import (
	eviction "github.com/buildbarn/bb-storage/pkg/proto/configuration/eviction"
	grpc "github.com/buildbarn/bb-storage/pkg/proto/configuration/grpc"
	jmespath "github.com/buildbarn/bb-storage/pkg/proto/configuration/jmespath"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
	structpb "google.golang.org/protobuf/types/known/structpb"
	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 AuthorizerConfiguration struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Policy:
	//
	//	*AuthorizerConfiguration_Allow
	//	*AuthorizerConfiguration_InstanceNamePrefix
	//	*AuthorizerConfiguration_Deny
	//	*AuthorizerConfiguration_JmespathExpression
	//	*AuthorizerConfiguration_Remote
	Policy        isAuthorizerConfiguration_Policy `protobuf_oneof:"policy"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*AuthorizerConfiguration) ProtoMessage() {}

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

func (x *AuthorizerConfiguration) GetPolicy() isAuthorizerConfiguration_Policy {
	if x != nil {
		return x.Policy
	}
	return nil
}

func (x *AuthorizerConfiguration) GetAllow() *emptypb.Empty {
	if x != nil {
		if x, ok := x.Policy.(*AuthorizerConfiguration_Allow); ok {
			return x.Allow
		}
	}
	return nil
}

func (x *AuthorizerConfiguration) GetInstanceNamePrefix() *InstanceNameAuthorizer {
	if x != nil {
		if x, ok := x.Policy.(*AuthorizerConfiguration_InstanceNamePrefix); ok {
			return x.InstanceNamePrefix
		}
	}
	return nil
}

func (x *AuthorizerConfiguration) GetDeny() *emptypb.Empty {
	if x != nil {
		if x, ok := x.Policy.(*AuthorizerConfiguration_Deny); ok {
			return x.Deny
		}
	}
	return nil
}

func (x *AuthorizerConfiguration) GetJmespathExpression() *jmespath.Expression {
	if x != nil {
		if x, ok := x.Policy.(*AuthorizerConfiguration_JmespathExpression); ok {
			return x.JmespathExpression
		}
	}
	return nil
}

func (x *AuthorizerConfiguration) GetRemote() *RemoteAuthorizer {
	if x != nil {
		if x, ok := x.Policy.(*AuthorizerConfiguration_Remote); ok {
			return x.Remote
		}
	}
	return nil
}

type isAuthorizerConfiguration_Policy interface {
	isAuthorizerConfiguration_Policy()
}

type AuthorizerConfiguration_Allow struct {
	Allow *emptypb.Empty `protobuf:"bytes,1,opt,name=allow,proto3,oneof"`
}

type AuthorizerConfiguration_InstanceNamePrefix struct {
	InstanceNamePrefix *InstanceNameAuthorizer `protobuf:"bytes,2,opt,name=instance_name_prefix,json=instanceNamePrefix,proto3,oneof"`
}

type AuthorizerConfiguration_Deny struct {
	Deny *emptypb.Empty `protobuf:"bytes,3,opt,name=deny,proto3,oneof"`
}

type AuthorizerConfiguration_JmespathExpression struct {
	JmespathExpression *jmespath.Expression `protobuf:"bytes,4,opt,name=jmespath_expression,json=jmespathExpression,proto3,oneof"`
}

type AuthorizerConfiguration_Remote struct {
	Remote *RemoteAuthorizer `protobuf:"bytes,7,opt,name=remote,proto3,oneof"`
}

func (*AuthorizerConfiguration_Allow) isAuthorizerConfiguration_Policy() {}

func (*AuthorizerConfiguration_InstanceNamePrefix) isAuthorizerConfiguration_Policy() {}

func (*AuthorizerConfiguration_Deny) isAuthorizerConfiguration_Policy() {}

func (*AuthorizerConfiguration_JmespathExpression) isAuthorizerConfiguration_Policy() {}

func (*AuthorizerConfiguration_Remote) isAuthorizerConfiguration_Policy() {}

type InstanceNameAuthorizer struct {
	state                       protoimpl.MessageState `protogen:"open.v1"`
	AllowedInstanceNamePrefixes []string               `protobuf:"bytes,1,rep,name=allowed_instance_name_prefixes,json=allowedInstanceNamePrefixes,proto3" json:"allowed_instance_name_prefixes,omitempty"`
	unknownFields               protoimpl.UnknownFields
	sizeCache                   protoimpl.SizeCache
}

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

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

func (*InstanceNameAuthorizer) ProtoMessage() {}

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

func (x *InstanceNameAuthorizer) GetAllowedInstanceNamePrefixes() []string {
	if x != nil {
		return x.AllowedInstanceNamePrefixes
	}
	return nil
}

type RemoteAuthorizer struct {
	state                  protoimpl.MessageState          `protogen:"open.v1"`
	Endpoint               *grpc.ClientConfiguration       `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Scope                  *structpb.Value                 `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"`
	MaximumCacheSize       int32                           `protobuf:"varint,3,opt,name=maximum_cache_size,json=maximumCacheSize,proto3" json:"maximum_cache_size,omitempty"`
	CacheReplacementPolicy eviction.CacheReplacementPolicy `protobuf:"varint,4,opt,name=cache_replacement_policy,json=cacheReplacementPolicy,proto3,enum=buildbarn.configuration.eviction.CacheReplacementPolicy" json:"cache_replacement_policy,omitempty"`
	unknownFields          protoimpl.UnknownFields
	sizeCache              protoimpl.SizeCache
}

func (x *RemoteAuthorizer) Reset() {
	*x = RemoteAuthorizer{}
	mi := &file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*RemoteAuthorizer) ProtoMessage() {}

func (x *RemoteAuthorizer) ProtoReflect() protoreflect.Message {
	mi := &file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_msgTypes[2]
	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 RemoteAuthorizer.ProtoReflect.Descriptor instead.
func (*RemoteAuthorizer) Descriptor() ([]byte, []int) {
	return file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDescGZIP(), []int{2}
}

func (x *RemoteAuthorizer) GetEndpoint() *grpc.ClientConfiguration {
	if x != nil {
		return x.Endpoint
	}
	return nil
}

func (x *RemoteAuthorizer) GetScope() *structpb.Value {
	if x != nil {
		return x.Scope
	}
	return nil
}

func (x *RemoteAuthorizer) GetMaximumCacheSize() int32 {
	if x != nil {
		return x.MaximumCacheSize
	}
	return 0
}

func (x *RemoteAuthorizer) GetCacheReplacementPolicy() eviction.CacheReplacementPolicy {
	if x != nil {
		return x.CacheReplacementPolicy
	}
	return eviction.CacheReplacementPolicy(0)
}

var File_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto protoreflect.FileDescriptor

const file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDesc = "" +
	"\n" +
	"Ggithub.com/buildbarn/bb-storage/pkg/proto/configuration/auth/auth.proto\x12\x1cbuildbarn.configuration.auth\x1aOgithub.com/buildbarn/bb-storage/pkg/proto/configuration/eviction/eviction.proto\x1aGgithub.com/buildbarn/bb-storage/pkg/proto/configuration/grpc/grpc.proto\x1aOgithub.com/buildbarn/bb-storage/pkg/proto/configuration/jmespath/jmespath.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x96\x03\n" +
	"\x17AuthorizerConfiguration\x12.\n" +
	"\x05allow\x18\x01 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x05allow\x12h\n" +
	"\x14instance_name_prefix\x18\x02 \x01(\v24.buildbarn.configuration.auth.InstanceNameAuthorizerH\x00R\x12instanceNamePrefix\x12,\n" +
	"\x04deny\x18\x03 \x01(\v2\x16.google.protobuf.EmptyH\x00R\x04deny\x12_\n" +
	"\x13jmespath_expression\x18\x04 \x01(\v2,.buildbarn.configuration.jmespath.ExpressionH\x00R\x12jmespathExpression\x12H\n" +
	"\x06remote\x18\a \x01(\v2..buildbarn.configuration.auth.RemoteAuthorizerH\x00R\x06remoteB\b\n" +
	"\x06policy\"]\n" +
	"\x16InstanceNameAuthorizer\x12C\n" +
	"\x1eallowed_instance_name_prefixes\x18\x01 \x03(\tR\x1ballowedInstanceNamePrefixes\"\xb1\x02\n" +
	"\x10RemoteAuthorizer\x12M\n" +
	"\bendpoint\x18\x01 \x01(\v21.buildbarn.configuration.grpc.ClientConfigurationR\bendpoint\x12,\n" +
	"\x05scope\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05scope\x12,\n" +
	"\x12maximum_cache_size\x18\x03 \x01(\x05R\x10maximumCacheSize\x12r\n" +
	"\x18cache_replacement_policy\x18\x04 \x01(\x0e28.buildbarn.configuration.eviction.CacheReplacementPolicyR\x16cacheReplacementPolicyB>Z<github.com/buildbarn/bb-storage/pkg/proto/configuration/authb\x06proto3"

var (
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDescOnce sync.Once
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDescData []byte
)

func file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDescGZIP() []byte {
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDescOnce.Do(func() {
		file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDesc), len(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDesc)))
	})
	return file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDescData
}

var file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_goTypes = []any{
	(*AuthorizerConfiguration)(nil),      // 0: buildbarn.configuration.auth.AuthorizerConfiguration
	(*InstanceNameAuthorizer)(nil),       // 1: buildbarn.configuration.auth.InstanceNameAuthorizer
	(*RemoteAuthorizer)(nil),             // 2: buildbarn.configuration.auth.RemoteAuthorizer
	(*emptypb.Empty)(nil),                // 3: google.protobuf.Empty
	(*jmespath.Expression)(nil),          // 4: buildbarn.configuration.jmespath.Expression
	(*grpc.ClientConfiguration)(nil),     // 5: buildbarn.configuration.grpc.ClientConfiguration
	(*structpb.Value)(nil),               // 6: google.protobuf.Value
	(eviction.CacheReplacementPolicy)(0), // 7: buildbarn.configuration.eviction.CacheReplacementPolicy
}
var file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_depIdxs = []int32{
	3, // 0: buildbarn.configuration.auth.AuthorizerConfiguration.allow:type_name -> google.protobuf.Empty
	1, // 1: buildbarn.configuration.auth.AuthorizerConfiguration.instance_name_prefix:type_name -> buildbarn.configuration.auth.InstanceNameAuthorizer
	3, // 2: buildbarn.configuration.auth.AuthorizerConfiguration.deny:type_name -> google.protobuf.Empty
	4, // 3: buildbarn.configuration.auth.AuthorizerConfiguration.jmespath_expression:type_name -> buildbarn.configuration.jmespath.Expression
	2, // 4: buildbarn.configuration.auth.AuthorizerConfiguration.remote:type_name -> buildbarn.configuration.auth.RemoteAuthorizer
	5, // 5: buildbarn.configuration.auth.RemoteAuthorizer.endpoint:type_name -> buildbarn.configuration.grpc.ClientConfiguration
	6, // 6: buildbarn.configuration.auth.RemoteAuthorizer.scope:type_name -> google.protobuf.Value
	7, // 7: buildbarn.configuration.auth.RemoteAuthorizer.cache_replacement_policy:type_name -> buildbarn.configuration.eviction.CacheReplacementPolicy
	8, // [8:8] is the sub-list for method output_type
	8, // [8:8] is the sub-list for method input_type
	8, // [8:8] is the sub-list for extension type_name
	8, // [8:8] is the sub-list for extension extendee
	0, // [0:8] is the sub-list for field type_name
}

func init() { file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_init() }
func file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_init() {
	if File_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto != nil {
		return
	}
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_msgTypes[0].OneofWrappers = []any{
		(*AuthorizerConfiguration_Allow)(nil),
		(*AuthorizerConfiguration_InstanceNamePrefix)(nil),
		(*AuthorizerConfiguration_Deny)(nil),
		(*AuthorizerConfiguration_JmespathExpression)(nil),
		(*AuthorizerConfiguration_Remote)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDesc), len(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_goTypes,
		DependencyIndexes: file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_depIdxs,
		MessageInfos:      file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_msgTypes,
	}.Build()
	File_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto = out.File
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_goTypes = nil
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_auth_auth_proto_depIdxs = nil
}
