// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.21.12
// source: yandex/cloud/mdb/redis/v1/user.proto

package redis

import (
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
	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)
)

// A Redis User resource. For more information, see the
// [Developer's Guide](/docs/managed-redis/concepts).
type User struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the Redis user.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ID of the Redis cluster the user belongs to.
	ClusterId string `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// Set of permissions to grant to the user.
	Permissions *Permissions `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
	// Is redis user enabled
	Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Raw ACL string inside of Redis
	AclOptions    string `protobuf:"bytes,5,opt,name=acl_options,json=aclOptions,proto3" json:"acl_options,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*User) ProtoMessage() {}

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

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

func (x *User) GetClusterId() string {
	if x != nil {
		return x.ClusterId
	}
	return ""
}

func (x *User) GetPermissions() *Permissions {
	if x != nil {
		return x.Permissions
	}
	return nil
}

func (x *User) GetEnabled() bool {
	if x != nil {
		return x.Enabled
	}
	return false
}

func (x *User) GetAclOptions() string {
	if x != nil {
		return x.AclOptions
	}
	return ""
}

type Permissions struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Keys patterns user has permission to.
	Patterns *wrapperspb.StringValue `protobuf:"bytes,1,opt,name=patterns,proto3" json:"patterns,omitempty"`
	// Channel patterns user has permissions to.
	PubSubChannels *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=pub_sub_channels,json=pubSubChannels,proto3" json:"pub_sub_channels,omitempty"`
	// Command categories user has permissions to.
	Categories *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=categories,proto3" json:"categories,omitempty"`
	// Commands user can execute.
	Commands *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=commands,proto3" json:"commands,omitempty"`
	// SanitizePayload parameter.
	SanitizePayload *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=sanitize_payload,json=sanitizePayload,proto3" json:"sanitize_payload,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

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

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

func (*Permissions) ProtoMessage() {}

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

func (x *Permissions) GetPatterns() *wrapperspb.StringValue {
	if x != nil {
		return x.Patterns
	}
	return nil
}

func (x *Permissions) GetPubSubChannels() *wrapperspb.StringValue {
	if x != nil {
		return x.PubSubChannels
	}
	return nil
}

func (x *Permissions) GetCategories() *wrapperspb.StringValue {
	if x != nil {
		return x.Categories
	}
	return nil
}

func (x *Permissions) GetCommands() *wrapperspb.StringValue {
	if x != nil {
		return x.Commands
	}
	return nil
}

func (x *Permissions) GetSanitizePayload() *wrapperspb.StringValue {
	if x != nil {
		return x.SanitizePayload
	}
	return nil
}

type UserSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the Redis user.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Password of the Redis user.
	Passwords []string `protobuf:"bytes,2,rep,name=passwords,proto3" json:"passwords,omitempty"`
	// Set of permissions to grant to the user.
	Permissions *Permissions `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
	// Is Redis user enabled
	Enabled       *wrapperspb.BoolValue `protobuf:"bytes,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*UserSpec) ProtoMessage() {}

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

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

func (x *UserSpec) GetPasswords() []string {
	if x != nil {
		return x.Passwords
	}
	return nil
}

func (x *UserSpec) GetPermissions() *Permissions {
	if x != nil {
		return x.Permissions
	}
	return nil
}

func (x *UserSpec) GetEnabled() *wrapperspb.BoolValue {
	if x != nil {
		return x.Enabled
	}
	return nil
}

var File_yandex_cloud_mdb_redis_v1_user_proto protoreflect.FileDescriptor

const file_yandex_cloud_mdb_redis_v1_user_proto_rawDesc = "" +
	"\n" +
	"$yandex/cloud/mdb/redis/v1/user.proto\x12\x19yandex.cloud.mdb.redis.v1\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dyandex/cloud/validation.proto\"\xbe\x01\n" +
	"\x04User\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" +
	"\n" +
	"cluster_id\x18\x02 \x01(\tR\tclusterId\x12H\n" +
	"\vpermissions\x18\x03 \x01(\v2&.yandex.cloud.mdb.redis.v1.PermissionsR\vpermissions\x12\x18\n" +
	"\aenabled\x18\x04 \x01(\bR\aenabled\x12\x1f\n" +
	"\vacl_options\x18\x05 \x01(\tR\n" +
	"aclOptions\"\xd0\x02\n" +
	"\vPermissions\x128\n" +
	"\bpatterns\x18\x01 \x01(\v2\x1c.google.protobuf.StringValueR\bpatterns\x12F\n" +
	"\x10pub_sub_channels\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x0epubSubChannels\x12<\n" +
	"\n" +
	"categories\x18\x03 \x01(\v2\x1c.google.protobuf.StringValueR\n" +
	"categories\x128\n" +
	"\bcommands\x18\x04 \x01(\v2\x1c.google.protobuf.StringValueR\bcommands\x12G\n" +
	"\x10sanitize_payload\x18\x05 \x01(\v2\x1c.google.protobuf.StringValueR\x0fsanitizePayload\"\x97\x02\n" +
	"\bUserSpec\x12@\n" +
	"\x04name\x18\x01 \x01(\tB,\xe8\xc71\x01\xf2\xc71\x1c^[a-zA-Z0-9_][a-zA-Z0-9_-]*$\x8a\xc81\x04<=32R\x04name\x12I\n" +
	"\tpasswords\x18\x02 \x03(\tB+\xf2\xc71\x1e^[a-zA-Z0-9@=+?*.,!&#$^<>_-]*$\x82\xc81\x011\x90\xc81\x01R\tpasswords\x12H\n" +
	"\vpermissions\x18\x03 \x01(\v2&.yandex.cloud.mdb.redis.v1.PermissionsR\vpermissions\x124\n" +
	"\aenabled\x18\x04 \x01(\v2\x1a.google.protobuf.BoolValueR\aenabledBd\n" +
	"\x1dyandex.cloud.api.mdb.redis.v1ZCgithub.com/yandex-cloud/go-genproto/yandex/cloud/mdb/redis/v1;redisb\x06proto3"

var (
	file_yandex_cloud_mdb_redis_v1_user_proto_rawDescOnce sync.Once
	file_yandex_cloud_mdb_redis_v1_user_proto_rawDescData []byte
)

func file_yandex_cloud_mdb_redis_v1_user_proto_rawDescGZIP() []byte {
	file_yandex_cloud_mdb_redis_v1_user_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_mdb_redis_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_mdb_redis_v1_user_proto_rawDesc), len(file_yandex_cloud_mdb_redis_v1_user_proto_rawDesc)))
	})
	return file_yandex_cloud_mdb_redis_v1_user_proto_rawDescData
}

var file_yandex_cloud_mdb_redis_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_yandex_cloud_mdb_redis_v1_user_proto_goTypes = []any{
	(*User)(nil),                   // 0: yandex.cloud.mdb.redis.v1.User
	(*Permissions)(nil),            // 1: yandex.cloud.mdb.redis.v1.Permissions
	(*UserSpec)(nil),               // 2: yandex.cloud.mdb.redis.v1.UserSpec
	(*wrapperspb.StringValue)(nil), // 3: google.protobuf.StringValue
	(*wrapperspb.BoolValue)(nil),   // 4: google.protobuf.BoolValue
}
var file_yandex_cloud_mdb_redis_v1_user_proto_depIdxs = []int32{
	1, // 0: yandex.cloud.mdb.redis.v1.User.permissions:type_name -> yandex.cloud.mdb.redis.v1.Permissions
	3, // 1: yandex.cloud.mdb.redis.v1.Permissions.patterns:type_name -> google.protobuf.StringValue
	3, // 2: yandex.cloud.mdb.redis.v1.Permissions.pub_sub_channels:type_name -> google.protobuf.StringValue
	3, // 3: yandex.cloud.mdb.redis.v1.Permissions.categories:type_name -> google.protobuf.StringValue
	3, // 4: yandex.cloud.mdb.redis.v1.Permissions.commands:type_name -> google.protobuf.StringValue
	3, // 5: yandex.cloud.mdb.redis.v1.Permissions.sanitize_payload:type_name -> google.protobuf.StringValue
	1, // 6: yandex.cloud.mdb.redis.v1.UserSpec.permissions:type_name -> yandex.cloud.mdb.redis.v1.Permissions
	4, // 7: yandex.cloud.mdb.redis.v1.UserSpec.enabled:type_name -> google.protobuf.BoolValue
	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_yandex_cloud_mdb_redis_v1_user_proto_init() }
func file_yandex_cloud_mdb_redis_v1_user_proto_init() {
	if File_yandex_cloud_mdb_redis_v1_user_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_yandex_cloud_mdb_redis_v1_user_proto_rawDesc), len(file_yandex_cloud_mdb_redis_v1_user_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   3,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_mdb_redis_v1_user_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_mdb_redis_v1_user_proto_depIdxs,
		MessageInfos:      file_yandex_cloud_mdb_redis_v1_user_proto_msgTypes,
	}.Build()
	File_yandex_cloud_mdb_redis_v1_user_proto = out.File
	file_yandex_cloud_mdb_redis_v1_user_proto_goTypes = nil
	file_yandex_cloud_mdb_redis_v1_user_proto_depIdxs = nil
}
