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

package mysql

import (
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	_ "github.com/golang/protobuf/ptypes/wrappers"
	_ "github.com/yandex-cloud/go-genproto/yandex/cloud"
	math "math"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

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 (stored procedures 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
	// details in [MySQL documentation](https://dev.mysql.com/doc/refman/5.7/en/privileges-provided.html#priv_select).
	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
)

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",
}

var 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,
}

func (x Permission_Privilege) String() string {
	return proto.EnumName(Permission_Privilege_name, int32(x))
}

func (Permission_Privilege) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_5965312201724c83, []int{1, 0}
}

// A MySQL user. For more information, see
// the [documentation](/docs/managed-mysql/concepts).
type User struct {
	// Name of the MySQL user.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ID of the MySQL 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"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (m *User) Reset()         { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage()    {}
func (*User) Descriptor() ([]byte, []int) {
	return fileDescriptor_5965312201724c83, []int{0}
}

func (m *User) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_User.Unmarshal(m, b)
}
func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_User.Marshal(b, m, deterministic)
}
func (m *User) XXX_Merge(src proto.Message) {
	xxx_messageInfo_User.Merge(m, src)
}
func (m *User) XXX_Size() int {
	return xxx_messageInfo_User.Size(m)
}
func (m *User) XXX_DiscardUnknown() {
	xxx_messageInfo_User.DiscardUnknown(m)
}

var xxx_messageInfo_User proto.InternalMessageInfo

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

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

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

type Permission struct {
	// 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.
	Roles                []Permission_Privilege `protobuf:"varint,2,rep,packed,name=roles,proto3,enum=yandex.cloud.mdb.mysql.v1.Permission_Privilege" json:"roles,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (m *Permission) Reset()         { *m = Permission{} }
func (m *Permission) String() string { return proto.CompactTextString(m) }
func (*Permission) ProtoMessage()    {}
func (*Permission) Descriptor() ([]byte, []int) {
	return fileDescriptor_5965312201724c83, []int{1}
}

func (m *Permission) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_Permission.Unmarshal(m, b)
}
func (m *Permission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_Permission.Marshal(b, m, deterministic)
}
func (m *Permission) XXX_Merge(src proto.Message) {
	xxx_messageInfo_Permission.Merge(m, src)
}
func (m *Permission) XXX_Size() int {
	return xxx_messageInfo_Permission.Size(m)
}
func (m *Permission) XXX_DiscardUnknown() {
	xxx_messageInfo_Permission.DiscardUnknown(m)
}

var xxx_messageInfo_Permission proto.InternalMessageInfo

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

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

type UserSpec struct {
	// Name of the MySQL user.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Password of the MySQL user.
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// Set of permissions to grant to the user.
	Permissions          []*Permission `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (m *UserSpec) Reset()         { *m = UserSpec{} }
func (m *UserSpec) String() string { return proto.CompactTextString(m) }
func (*UserSpec) ProtoMessage()    {}
func (*UserSpec) Descriptor() ([]byte, []int) {
	return fileDescriptor_5965312201724c83, []int{2}
}

func (m *UserSpec) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_UserSpec.Unmarshal(m, b)
}
func (m *UserSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_UserSpec.Marshal(b, m, deterministic)
}
func (m *UserSpec) XXX_Merge(src proto.Message) {
	xxx_messageInfo_UserSpec.Merge(m, src)
}
func (m *UserSpec) XXX_Size() int {
	return xxx_messageInfo_UserSpec.Size(m)
}
func (m *UserSpec) XXX_DiscardUnknown() {
	xxx_messageInfo_UserSpec.DiscardUnknown(m)
}

var xxx_messageInfo_UserSpec proto.InternalMessageInfo

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

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

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

func init() {
	proto.RegisterEnum("yandex.cloud.mdb.mysql.v1.Permission_Privilege", Permission_Privilege_name, Permission_Privilege_value)
	proto.RegisterType((*User)(nil), "yandex.cloud.mdb.mysql.v1.User")
	proto.RegisterType((*Permission)(nil), "yandex.cloud.mdb.mysql.v1.Permission")
	proto.RegisterType((*UserSpec)(nil), "yandex.cloud.mdb.mysql.v1.UserSpec")
}

func init() {
	proto.RegisterFile("yandex/cloud/mdb/mysql/v1/user.proto", fileDescriptor_5965312201724c83)
}

var fileDescriptor_5965312201724c83 = []byte{
	// 597 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0x4d, 0x6f, 0xd3, 0x4e,
	0x10, 0xc6, 0xff, 0x79, 0x6b, 0x93, 0x49, 0xd3, 0x6e, 0x57, 0xfa, 0x8b, 0xb4, 0xa8, 0xa8, 0x0a,
	0x20, 0x15, 0xa4, 0xd8, 0x38, 0xbd, 0x14, 0x41, 0x91, 0xf2, 0x32, 0x04, 0x0b, 0xe3, 0x58, 0x6b,
	0xa7, 0x2d, 0x45, 0xc8, 0x72, 0xe2, 0x25, 0x58, 0x72, 0xe2, 0x60, 0x27, 0x29, 0xe5, 0xd8, 0x63,
	0x3f, 0x0d, 0x48, 0x7c, 0x87, 0xf6, 0xa3, 0x70, 0xe6, 0x13, 0xa0, 0xb5, 0xd3, 0x10, 0x0e, 0x95,
	0x38, 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