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

package mysql

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)
)

type GlobalPermission int32

const (
	GlobalPermission_GLOBAL_PERMISSION_UNSPECIFIED GlobalPermission = 0
	// Enables use of the `SHOW MASTER STATUS`, `SHOW SLAVE STATUS`, and `SHOW BINARY LOGS` statements.
	GlobalPermission_REPLICATION_CLIENT GlobalPermission = 1
	// Enables the account to request updates that have been made to databases on the master server,
	// using the `SHOW SLAVE HOSTS`, `SHOW RELAYLOG EVENTS` and `SHOW BINLOG EVENTS` statements.
	GlobalPermission_REPLICATION_SLAVE GlobalPermission = 2
	// Enables display of information about the the statements currently being performed by sessions (the set of threads executing within the server).
	//
	// The privilege enables use of `SHOW PROCESSLIST` or `mysqladmin` processlist to see threads belonging to other users.
	// You can always see your own threads. The `PROCESS` privilege also enables use of `SHOW ENGINE`.
	GlobalPermission_PROCESS GlobalPermission = 3
	// Enables use of the `FLUSH OPTIMIZER_COSTS` statement.
	GlobalPermission_FLUSH_OPTIMIZER_COSTS GlobalPermission = 4
	// Enables a user to access definitions and properties of all stored routines (stored procedures and functions), even those for which the user is not named as the routine DEFINER.
	// This access includes:
	// The contents of the Information Schema `ROUTINES` table.
	// The `SHOW CREATE FUNCTION` and `SHOW CREATE PROCEDURE` statements.
	// The `SHOW FUNCTION CODE` and `SHOW PROCEDURE CODE` statements.
	// The SHOW `FUNCTION STATUS` and `SHOW PROCEDURE STATUS` statements.
	GlobalPermission_SHOW_ROUTINE GlobalPermission = 5
	// Enables use of the KILL command, creating and dropping databases and users, granting privileges to tables and databases.
	GlobalPermission_MDB_ADMIN GlobalPermission = 6
)

// Enum value maps for GlobalPermission.
var (
	GlobalPermission_name = map[int32]string{
		0: "GLOBAL_PERMISSION_UNSPECIFIED",
		1: "REPLICATION_CLIENT",
		2: "REPLICATION_SLAVE",
		3: "PROCESS",
		4: "FLUSH_OPTIMIZER_COSTS",
		5: "SHOW_ROUTINE",
		6: "MDB_ADMIN",
	}
	GlobalPermission_value = map[string]int32{
		"GLOBAL_PERMISSION_UNSPECIFIED": 0,
		"REPLICATION_CLIENT":            1,
		"REPLICATION_SLAVE":             2,
		"PROCESS":                       3,
		"FLUSH_OPTIMIZER_COSTS":         4,
		"SHOW_ROUTINE":                  5,
		"MDB_ADMIN":                     6,
	}
)

func (x GlobalPermission) Enum() *GlobalPermission {
	p := new(GlobalPermission)
	*p = x
	return p
}

func (x GlobalPermission) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (GlobalPermission) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes[0].Descriptor()
}

func (GlobalPermission) Type() protoreflect.EnumType {
	return &file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes[0]
}

func (x GlobalPermission) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use GlobalPermission.Descriptor instead.
func (GlobalPermission) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescGZIP(), []int{0}
}

type AuthPlugin int32

const (
	AuthPlugin_AUTH_PLUGIN_UNSPECIFIED AuthPlugin = 0
	// Use [Native Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/native-pluggable-authentication.html).
	AuthPlugin_MYSQL_NATIVE_PASSWORD AuthPlugin = 1
	// Use [Caching SHA-2 Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html).
	AuthPlugin_CACHING_SHA2_PASSWORD AuthPlugin = 2
	// Use [SHA-256 Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html).
	AuthPlugin_SHA256_PASSWORD AuthPlugin = 3
	// Use [MYSQL_NO_LOGIN Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/no-login-pluggable-authentication.html).
	AuthPlugin_MYSQL_NO_LOGIN AuthPlugin = 4
	// Use [IAM Pluggable Authentication](https://yandex.cloud/en/docs/iam/concepts/authorization/).
	AuthPlugin_MDB_IAMPROXY_AUTH AuthPlugin = 5
)

// Enum value maps for AuthPlugin.
var (
	AuthPlugin_name = map[int32]string{
		0: "AUTH_PLUGIN_UNSPECIFIED",
		1: "MYSQL_NATIVE_PASSWORD",
		2: "CACHING_SHA2_PASSWORD",
		3: "SHA256_PASSWORD",
		4: "MYSQL_NO_LOGIN",
		5: "MDB_IAMPROXY_AUTH",
	}
	AuthPlugin_value = map[string]int32{
		"AUTH_PLUGIN_UNSPECIFIED": 0,
		"MYSQL_NATIVE_PASSWORD":   1,
		"CACHING_SHA2_PASSWORD":   2,
		"SHA256_PASSWORD":         3,
		"MYSQL_NO_LOGIN":          4,
		"MDB_IAMPROXY_AUTH":       5,
	}
)

func (x AuthPlugin) Enum() *AuthPlugin {
	p := new(AuthPlugin)
	*p = x
	return p
}

func (x AuthPlugin) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (AuthPlugin) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes[1].Descriptor()
}

func (AuthPlugin) Type() protoreflect.EnumType {
	return &file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes[1]
}

func (x AuthPlugin) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use AuthPlugin.Descriptor instead.
func (AuthPlugin) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescGZIP(), []int{1}
}

type Permission_Privilege int32

const (
	Permission_PRIVILEGE_UNSPECIFIED Permission_Privilege = 0
	// All privileges that can be made available to the user.
	Permission_ALL_PRIVILEGES Permission_Privilege = 1
	// Altering tables.
	Permission_ALTER Permission_Privilege = 2
	// Altering stored routines and functions.
	Permission_ALTER_ROUTINE Permission_Privilege = 3
	// Creating tables or indexes.
	Permission_CREATE Permission_Privilege = 4
	// Creating stored routines.
	Permission_CREATE_ROUTINE Permission_Privilege = 5
	// Creating temporary tables.
	Permission_CREATE_TEMPORARY_TABLES Permission_Privilege = 6
	// Creating views.
	Permission_CREATE_VIEW Permission_Privilege = 7
	// Deleting tables.
	Permission_DELETE Permission_Privilege = 8
	// Removing tables or views.
	Permission_DROP Permission_Privilege = 9
	// Creating, altering, dropping, or displaying events for the Event Scheduler.
	Permission_EVENT Permission_Privilege = 10
	// Executing stored routines.
	Permission_EXECUTE Permission_Privilege = 11
	// Creating and removing indexes.
	Permission_INDEX Permission_Privilege = 12
	// Inserting rows into the database.
	Permission_INSERT Permission_Privilege = 13
	// Using `LOCK TABLES` statement for tables available with `SELECT` privilege.
	Permission_LOCK_TABLES Permission_Privilege = 14
	// Selecting rows from tables.
	//
	// Some `SELECT` statements can be allowed without the `SELECT` privilege. All statements that read column values require the `SELECT` privilege.
	//
	// See [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_select) for details.
	Permission_SELECT Permission_Privilege = 15
	// Using the `SHOW CREATE VIEW` statement. Also needed for views used with `EXPLAIN`.
	Permission_SHOW_VIEW Permission_Privilege = 16
	// Creating, removing, executing, or displaying triggers for a table.
	Permission_TRIGGER Permission_Privilege = 17
	// Updating rows in the database.
	Permission_UPDATE Permission_Privilege = 18
	// Creation of a foreign key constraint for the parent table.
	Permission_REFERENCES Permission_Privilege = 19
)

// Enum value maps for Permission_Privilege.
var (
	Permission_Privilege_name = map[int32]string{
		0:  "PRIVILEGE_UNSPECIFIED",
		1:  "ALL_PRIVILEGES",
		2:  "ALTER",
		3:  "ALTER_ROUTINE",
		4:  "CREATE",
		5:  "CREATE_ROUTINE",
		6:  "CREATE_TEMPORARY_TABLES",
		7:  "CREATE_VIEW",
		8:  "DELETE",
		9:  "DROP",
		10: "EVENT",
		11: "EXECUTE",
		12: "INDEX",
		13: "INSERT",
		14: "LOCK_TABLES",
		15: "SELECT",
		16: "SHOW_VIEW",
		17: "TRIGGER",
		18: "UPDATE",
		19: "REFERENCES",
	}
	Permission_Privilege_value = map[string]int32{
		"PRIVILEGE_UNSPECIFIED":   0,
		"ALL_PRIVILEGES":          1,
		"ALTER":                   2,
		"ALTER_ROUTINE":           3,
		"CREATE":                  4,
		"CREATE_ROUTINE":          5,
		"CREATE_TEMPORARY_TABLES": 6,
		"CREATE_VIEW":             7,
		"DELETE":                  8,
		"DROP":                    9,
		"EVENT":                   10,
		"EXECUTE":                 11,
		"INDEX":                   12,
		"INSERT":                  13,
		"LOCK_TABLES":             14,
		"SELECT":                  15,
		"SHOW_VIEW":               16,
		"TRIGGER":                 17,
		"UPDATE":                  18,
		"REFERENCES":              19,
	}
)

func (x Permission_Privilege) Enum() *Permission_Privilege {
	p := new(Permission_Privilege)
	*p = x
	return p
}

func (x Permission_Privilege) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Permission_Privilege) Descriptor() protoreflect.EnumDescriptor {
	return file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes[2].Descriptor()
}

func (Permission_Privilege) Type() protoreflect.EnumType {
	return &file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes[2]
}

func (x Permission_Privilege) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use Permission_Privilege.Descriptor instead.
func (Permission_Privilege) EnumDescriptor() ([]byte, []int) {
	return file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescGZIP(), []int{1, 0}
}

// An object that represents MySQL user.
//
// See [the documentation](/docs/managed-mysql/operations/cluster-users) for details.
type User struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the user.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ID of the cluster the user belongs to.
	ClusterId string `protobuf:"bytes,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	// Set of permissions granted to the user.
	Permissions []*Permission `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// Set of global permissions to grant to the user.
	GlobalPermissions []GlobalPermission `protobuf:"varint,4,rep,packed,name=global_permissions,json=globalPermissions,proto3,enum=yandex.cloud.mdb.mysql.v1.GlobalPermission" json:"global_permissions,omitempty"`
	// Set of user connection limits.
	ConnectionLimits *ConnectionLimits `protobuf:"bytes,5,opt,name=connection_limits,json=connectionLimits,proto3" json:"connection_limits,omitempty"`
	// User authentication plugin.
	AuthenticationPlugin AuthPlugin `protobuf:"varint,6,opt,name=authentication_plugin,json=authenticationPlugin,proto3,enum=yandex.cloud.mdb.mysql.v1.AuthPlugin" json:"authentication_plugin,omitempty"`
	// Connection Manager Connection and settings associated with user. Read only field.
	ConnectionManager *ConnectionManager `protobuf:"bytes,7,opt,name=connection_manager,json=connectionManager,proto3" json:"connection_manager,omitempty"`
	unknownFields     protoimpl.UnknownFields
	sizeCache         protoimpl.SizeCache
}

func (x *User) Reset() {
	*x = User{}
	mi := &file_yandex_cloud_mdb_mysql_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_mysql_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_mysql_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() []*Permission {
	if x != nil {
		return x.Permissions
	}
	return nil
}

func (x *User) GetGlobalPermissions() []GlobalPermission {
	if x != nil {
		return x.GlobalPermissions
	}
	return nil
}

func (x *User) GetConnectionLimits() *ConnectionLimits {
	if x != nil {
		return x.ConnectionLimits
	}
	return nil
}

func (x *User) GetAuthenticationPlugin() AuthPlugin {
	if x != nil {
		return x.AuthenticationPlugin
	}
	return AuthPlugin_AUTH_PLUGIN_UNSPECIFIED
}

func (x *User) GetConnectionManager() *ConnectionManager {
	if x != nil {
		return x.ConnectionManager
	}
	return nil
}

type Permission struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the database that the permission grants access to.
	DatabaseName string `protobuf:"bytes,1,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"`
	// Roles granted to the user within the database.
	//
	// See [the documentation](/docs/managed-mysql/operations/grant) for details.
	Roles         []Permission_Privilege `protobuf:"varint,2,rep,packed,name=roles,proto3,enum=yandex.cloud.mdb.mysql.v1.Permission_Privilege" json:"roles,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*Permission) ProtoMessage() {}

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

func (x *Permission) GetDatabaseName() string {
	if x != nil {
		return x.DatabaseName
	}
	return ""
}

func (x *Permission) GetRoles() []Permission_Privilege {
	if x != nil {
		return x.Roles
	}
	return nil
}

type ConnectionLimits struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The maximum permitted number of user questions per hour.
	MaxQuestionsPerHour *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=max_questions_per_hour,json=maxQuestionsPerHour,proto3" json:"max_questions_per_hour,omitempty"`
	// The maximum permitted number of user updates per hour.
	MaxUpdatesPerHour *wrapperspb.Int64Value `protobuf:"bytes,2,opt,name=max_updates_per_hour,json=maxUpdatesPerHour,proto3" json:"max_updates_per_hour,omitempty"`
	// The maximum permitted number of simultaneous client connections per hour.
	MaxConnectionsPerHour *wrapperspb.Int64Value `protobuf:"bytes,3,opt,name=max_connections_per_hour,json=maxConnectionsPerHour,proto3" json:"max_connections_per_hour,omitempty"`
	// The maximum number of simultaneous connections permitted to any given MySQL user account.
	MaxUserConnections *wrapperspb.Int64Value `protobuf:"bytes,4,opt,name=max_user_connections,json=maxUserConnections,proto3" json:"max_user_connections,omitempty"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

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

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

func (*ConnectionLimits) ProtoMessage() {}

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

func (x *ConnectionLimits) GetMaxQuestionsPerHour() *wrapperspb.Int64Value {
	if x != nil {
		return x.MaxQuestionsPerHour
	}
	return nil
}

func (x *ConnectionLimits) GetMaxUpdatesPerHour() *wrapperspb.Int64Value {
	if x != nil {
		return x.MaxUpdatesPerHour
	}
	return nil
}

func (x *ConnectionLimits) GetMaxConnectionsPerHour() *wrapperspb.Int64Value {
	if x != nil {
		return x.MaxConnectionsPerHour
	}
	return nil
}

func (x *ConnectionLimits) GetMaxUserConnections() *wrapperspb.Int64Value {
	if x != nil {
		return x.MaxUserConnections
	}
	return nil
}

type ConnectionManager struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// ID of Connection Manager Connection
	ConnectionId  string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ConnectionManager) Reset() {
	*x = ConnectionManager{}
	mi := &file_yandex_cloud_mdb_mysql_v1_user_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*ConnectionManager) ProtoMessage() {}

func (x *ConnectionManager) ProtoReflect() protoreflect.Message {
	mi := &file_yandex_cloud_mdb_mysql_v1_user_proto_msgTypes[3]
	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 ConnectionManager.ProtoReflect.Descriptor instead.
func (*ConnectionManager) Descriptor() ([]byte, []int) {
	return file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescGZIP(), []int{3}
}

func (x *ConnectionManager) GetConnectionId() string {
	if x != nil {
		return x.ConnectionId
	}
	return ""
}

type UserSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Name of the user.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Password of the user.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// Set of permissions granted to the user to access specific databases.
	// One permission per database.
	//
	// When a permission for a database is set, the user will have access to the database.
	Permissions []*Permission `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// Set of global permissions to grant to the user.
	GlobalPermissions []GlobalPermission `protobuf:"varint,4,rep,packed,name=global_permissions,json=globalPermissions,proto3,enum=yandex.cloud.mdb.mysql.v1.GlobalPermission" json:"global_permissions,omitempty"`
	// Set of user connection limits.
	ConnectionLimits *ConnectionLimits `protobuf:"bytes,5,opt,name=connection_limits,json=connectionLimits,proto3" json:"connection_limits,omitempty"`
	// User authentication plugin.
	AuthenticationPlugin AuthPlugin `protobuf:"varint,6,opt,name=authentication_plugin,json=authenticationPlugin,proto3,enum=yandex.cloud.mdb.mysql.v1.AuthPlugin" json:"authentication_plugin,omitempty"`
	// Generate password using Connection Manager.
	GeneratePassword *wrapperspb.BoolValue `protobuf:"bytes,7,opt,name=generate_password,json=generatePassword,proto3" json:"generate_password,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

func (x *UserSpec) Reset() {
	*x = UserSpec{}
	mi := &file_yandex_cloud_mdb_mysql_v1_user_proto_msgTypes[4]
	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_mysql_v1_user_proto_msgTypes[4]
	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_mysql_v1_user_proto_rawDescGZIP(), []int{4}
}

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

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

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

func (x *UserSpec) GetGlobalPermissions() []GlobalPermission {
	if x != nil {
		return x.GlobalPermissions
	}
	return nil
}

func (x *UserSpec) GetConnectionLimits() *ConnectionLimits {
	if x != nil {
		return x.ConnectionLimits
	}
	return nil
}

func (x *UserSpec) GetAuthenticationPlugin() AuthPlugin {
	if x != nil {
		return x.AuthenticationPlugin
	}
	return AuthPlugin_AUTH_PLUGIN_UNSPECIFIED
}

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

var File_yandex_cloud_mdb_mysql_v1_user_proto protoreflect.FileDescriptor

const file_yandex_cloud_mdb_mysql_v1_user_proto_rawDesc = "" +
	"\n" +
	"$yandex/cloud/mdb/mysql/v1/user.proto\x12\x19yandex.cloud.mdb.mysql.v1\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dyandex/cloud/validation.proto\"\xf1\x03\n" +
	"\x04User\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" +
	"\n" +
	"cluster_id\x18\x02 \x01(\tR\tclusterId\x12G\n" +
	"\vpermissions\x18\x03 \x03(\v2%.yandex.cloud.mdb.mysql.v1.PermissionR\vpermissions\x12Z\n" +
	"\x12global_permissions\x18\x04 \x03(\x0e2+.yandex.cloud.mdb.mysql.v1.GlobalPermissionR\x11globalPermissions\x12X\n" +
	"\x11connection_limits\x18\x05 \x01(\v2+.yandex.cloud.mdb.mysql.v1.ConnectionLimitsR\x10connectionLimits\x12Z\n" +
	"\x15authentication_plugin\x18\x06 \x01(\x0e2%.yandex.cloud.mdb.mysql.v1.AuthPluginR\x14authenticationPlugin\x12[\n" +
	"\x12connection_manager\x18\a \x01(\v2,.yandex.cloud.mdb.mysql.v1.ConnectionManagerR\x11connectionManager\"\xc4\x03\n" +
	"\n" +
	"Permission\x12#\n" +
	"\rdatabase_name\x18\x01 \x01(\tR\fdatabaseName\x12N\n" +
	"\x05roles\x18\x02 \x03(\x0e2/.yandex.cloud.mdb.mysql.v1.Permission.PrivilegeB\a\x82\xc81\x03>=1R\x05roles\"\xc0\x02\n" +
	"\tPrivilege\x12\x19\n" +
	"\x15PRIVILEGE_UNSPECIFIED\x10\x00\x12\x12\n" +
	"\x0eALL_PRIVILEGES\x10\x01\x12\t\n" +
	"\x05ALTER\x10\x02\x12\x11\n" +
	"\rALTER_ROUTINE\x10\x03\x12\n" +
	"\n" +
	"\x06CREATE\x10\x04\x12\x12\n" +
	"\x0eCREATE_ROUTINE\x10\x05\x12\x1b\n" +
	"\x17CREATE_TEMPORARY_TABLES\x10\x06\x12\x0f\n" +
	"\vCREATE_VIEW\x10\a\x12\n" +
	"\n" +
	"\x06DELETE\x10\b\x12\b\n" +
	"\x04DROP\x10\t\x12\t\n" +
	"\x05EVENT\x10\n" +
	"\x12\v\n" +
	"\aEXECUTE\x10\v\x12\t\n" +
	"\x05INDEX\x10\f\x12\n" +
	"\n" +
	"\x06INSERT\x10\r\x12\x0f\n" +
	"\vLOCK_TABLES\x10\x0e\x12\n" +
	"\n" +
	"\x06SELECT\x10\x0f\x12\r\n" +
	"\tSHOW_VIEW\x10\x10\x12\v\n" +
	"\aTRIGGER\x10\x11\x12\n" +
	"\n" +
	"\x06UPDATE\x10\x12\x12\x0e\n" +
	"\n" +
	"REFERENCES\x10\x13\"\xfb\x02\n" +
	"\x10ConnectionLimits\x12Y\n" +
	"\x16max_questions_per_hour\x18\x01 \x01(\v2\x1b.google.protobuf.Int64ValueB\a\xfa\xc71\x03>=0R\x13maxQuestionsPerHour\x12U\n" +
	"\x14max_updates_per_hour\x18\x02 \x01(\v2\x1b.google.protobuf.Int64ValueB\a\xfa\xc71\x03>=0R\x11maxUpdatesPerHour\x12]\n" +
	"\x18max_connections_per_hour\x18\x03 \x01(\v2\x1b.google.protobuf.Int64ValueB\a\xfa\xc71\x03>=0R\x15maxConnectionsPerHour\x12V\n" +
	"\x14max_user_connections\x18\x04 \x01(\v2\x1b.google.protobuf.Int64ValueB\a\xfa\xc71\x03>=0R\x12maxUserConnections\"8\n" +
	"\x11ConnectionManager\x12#\n" +
	"\rconnection_id\x18\x01 \x01(\tR\fconnectionId\"\x8d\x04\n" +
	"\bUserSpec\x122\n" +
	"\x04name\x18\x01 \x01(\tB\x1e\xe8\xc71\x01\xf2\xc71\x0e[a-zA-Z0-9_-]*\x8a\xc81\x04<=32R\x04name\x12)\n" +
	"\bpassword\x18\x02 \x01(\tB\r\xe8\xc71\x01\x8a\xc81\x058-128R\bpassword\x12G\n" +
	"\vpermissions\x18\x03 \x03(\v2%.yandex.cloud.mdb.mysql.v1.PermissionR\vpermissions\x12Z\n" +
	"\x12global_permissions\x18\x04 \x03(\x0e2+.yandex.cloud.mdb.mysql.v1.GlobalPermissionR\x11globalPermissions\x12X\n" +
	"\x11connection_limits\x18\x05 \x01(\v2+.yandex.cloud.mdb.mysql.v1.ConnectionLimitsR\x10connectionLimits\x12Z\n" +
	"\x15authentication_plugin\x18\x06 \x01(\x0e2%.yandex.cloud.mdb.mysql.v1.AuthPluginR\x14authenticationPlugin\x12G\n" +
	"\x11generate_password\x18\a \x01(\v2\x1a.google.protobuf.BoolValueR\x10generatePassword*\xad\x01\n" +
	"\x10GlobalPermission\x12!\n" +
	"\x1dGLOBAL_PERMISSION_UNSPECIFIED\x10\x00\x12\x16\n" +
	"\x12REPLICATION_CLIENT\x10\x01\x12\x15\n" +
	"\x11REPLICATION_SLAVE\x10\x02\x12\v\n" +
	"\aPROCESS\x10\x03\x12\x19\n" +
	"\x15FLUSH_OPTIMIZER_COSTS\x10\x04\x12\x10\n" +
	"\fSHOW_ROUTINE\x10\x05\x12\r\n" +
	"\tMDB_ADMIN\x10\x06*\x9f\x01\n" +
	"\n" +
	"AuthPlugin\x12\x1b\n" +
	"\x17AUTH_PLUGIN_UNSPECIFIED\x10\x00\x12\x19\n" +
	"\x15MYSQL_NATIVE_PASSWORD\x10\x01\x12\x19\n" +
	"\x15CACHING_SHA2_PASSWORD\x10\x02\x12\x13\n" +
	"\x0fSHA256_PASSWORD\x10\x03\x12\x12\n" +
	"\x0eMYSQL_NO_LOGIN\x10\x04\x12\x15\n" +
	"\x11MDB_IAMPROXY_AUTH\x10\x05Bd\n" +
	"\x1dyandex.cloud.api.mdb.mysql.v1ZCgithub.com/yandex-cloud/go-genproto/yandex/cloud/mdb/mysql/v1;mysqlb\x06proto3"

var (
	file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescOnce sync.Once
	file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescData []byte
)

func file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescGZIP() []byte {
	file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescOnce.Do(func() {
		file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_yandex_cloud_mdb_mysql_v1_user_proto_rawDesc), len(file_yandex_cloud_mdb_mysql_v1_user_proto_rawDesc)))
	})
	return file_yandex_cloud_mdb_mysql_v1_user_proto_rawDescData
}

var file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_yandex_cloud_mdb_mysql_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_yandex_cloud_mdb_mysql_v1_user_proto_goTypes = []any{
	(GlobalPermission)(0),         // 0: yandex.cloud.mdb.mysql.v1.GlobalPermission
	(AuthPlugin)(0),               // 1: yandex.cloud.mdb.mysql.v1.AuthPlugin
	(Permission_Privilege)(0),     // 2: yandex.cloud.mdb.mysql.v1.Permission.Privilege
	(*User)(nil),                  // 3: yandex.cloud.mdb.mysql.v1.User
	(*Permission)(nil),            // 4: yandex.cloud.mdb.mysql.v1.Permission
	(*ConnectionLimits)(nil),      // 5: yandex.cloud.mdb.mysql.v1.ConnectionLimits
	(*ConnectionManager)(nil),     // 6: yandex.cloud.mdb.mysql.v1.ConnectionManager
	(*UserSpec)(nil),              // 7: yandex.cloud.mdb.mysql.v1.UserSpec
	(*wrapperspb.Int64Value)(nil), // 8: google.protobuf.Int64Value
	(*wrapperspb.BoolValue)(nil),  // 9: google.protobuf.BoolValue
}
var file_yandex_cloud_mdb_mysql_v1_user_proto_depIdxs = []int32{
	4,  // 0: yandex.cloud.mdb.mysql.v1.User.permissions:type_name -> yandex.cloud.mdb.mysql.v1.Permission
	0,  // 1: yandex.cloud.mdb.mysql.v1.User.global_permissions:type_name -> yandex.cloud.mdb.mysql.v1.GlobalPermission
	5,  // 2: yandex.cloud.mdb.mysql.v1.User.connection_limits:type_name -> yandex.cloud.mdb.mysql.v1.ConnectionLimits
	1,  // 3: yandex.cloud.mdb.mysql.v1.User.authentication_plugin:type_name -> yandex.cloud.mdb.mysql.v1.AuthPlugin
	6,  // 4: yandex.cloud.mdb.mysql.v1.User.connection_manager:type_name -> yandex.cloud.mdb.mysql.v1.ConnectionManager
	2,  // 5: yandex.cloud.mdb.mysql.v1.Permission.roles:type_name -> yandex.cloud.mdb.mysql.v1.Permission.Privilege
	8,  // 6: yandex.cloud.mdb.mysql.v1.ConnectionLimits.max_questions_per_hour:type_name -> google.protobuf.Int64Value
	8,  // 7: yandex.cloud.mdb.mysql.v1.ConnectionLimits.max_updates_per_hour:type_name -> google.protobuf.Int64Value
	8,  // 8: yandex.cloud.mdb.mysql.v1.ConnectionLimits.max_connections_per_hour:type_name -> google.protobuf.Int64Value
	8,  // 9: yandex.cloud.mdb.mysql.v1.ConnectionLimits.max_user_connections:type_name -> google.protobuf.Int64Value
	4,  // 10: yandex.cloud.mdb.mysql.v1.UserSpec.permissions:type_name -> yandex.cloud.mdb.mysql.v1.Permission
	0,  // 11: yandex.cloud.mdb.mysql.v1.UserSpec.global_permissions:type_name -> yandex.cloud.mdb.mysql.v1.GlobalPermission
	5,  // 12: yandex.cloud.mdb.mysql.v1.UserSpec.connection_limits:type_name -> yandex.cloud.mdb.mysql.v1.ConnectionLimits
	1,  // 13: yandex.cloud.mdb.mysql.v1.UserSpec.authentication_plugin:type_name -> yandex.cloud.mdb.mysql.v1.AuthPlugin
	9,  // 14: yandex.cloud.mdb.mysql.v1.UserSpec.generate_password:type_name -> google.protobuf.BoolValue
	15, // [15:15] is the sub-list for method output_type
	15, // [15:15] is the sub-list for method input_type
	15, // [15:15] is the sub-list for extension type_name
	15, // [15:15] is the sub-list for extension extendee
	0,  // [0:15] is the sub-list for field type_name
}

func init() { file_yandex_cloud_mdb_mysql_v1_user_proto_init() }
func file_yandex_cloud_mdb_mysql_v1_user_proto_init() {
	if File_yandex_cloud_mdb_mysql_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_mysql_v1_user_proto_rawDesc), len(file_yandex_cloud_mdb_mysql_v1_user_proto_rawDesc)),
			NumEnums:      3,
			NumMessages:   5,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_yandex_cloud_mdb_mysql_v1_user_proto_goTypes,
		DependencyIndexes: file_yandex_cloud_mdb_mysql_v1_user_proto_depIdxs,
		EnumInfos:         file_yandex_cloud_mdb_mysql_v1_user_proto_enumTypes,
		MessageInfos:      file_yandex_cloud_mdb_mysql_v1_user_proto_msgTypes,
	}.Build()
	File_yandex_cloud_mdb_mysql_v1_user_proto = out.File
	file_yandex_cloud_mdb_mysql_v1_user_proto_goTypes = nil
	file_yandex_cloud_mdb_mysql_v1_user_proto_depIdxs = nil
}
