// Code generated by protoc-gen-go. DO NOT EDIT.
// source: console/console.proto

/*
Package console is a generated protocol buffer package.

It is generated from these files:
	console/console.proto

It has these top-level messages:
	AccountExport
	AccountIdRequest
	AuthenticateRequest
	Session
*/
package console

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import nakama_api "github.com/heroiclabs/nakama/api"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/empty"
import _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// 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.ProtoPackageIsVersion2 // please upgrade the proto package

// *
// An export of all information stored for a user account.
type AccountExport struct {
	// The user's account details.
	Account *nakama_api.Account `protobuf:"bytes,1,opt,name=account" json:"account,omitempty"`
	// The user's groups.
	Groups []*nakama_api.Group `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty"`
}

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

func (m *AccountExport) GetAccount() *nakama_api.Account {
	if m != nil {
		return m.Account
	}
	return nil
}

func (m *AccountExport) GetGroups() []*nakama_api.Group {
	if m != nil {
		return m.Groups
	}
	return nil
}

// *
// The identifier for a user account.
type AccountIdRequest struct {
	// The unique identifier of the user account.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

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

func (m *AccountIdRequest) GetId() string {
	if m != nil {
		return m.Id
	}
	return ""
}

// *
// Authenticate against the server with username+password.
type AuthenticateRequest struct {
	// The username of the user.
	Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
	// The password of the user.
	Password string `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"`
}

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

func (m *AuthenticateRequest) GetUsername() string {
	if m != nil {
		return m.Username
	}
	return ""
}

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

// *
// A user's session used to authenticate messages.
type Session struct {
	// Authentication credentials.
	Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"`
}

func (m *Session) Reset()                    { *m = Session{} }
func (m *Session) String() string            { return proto.CompactTextString(m) }
func (*Session) ProtoMessage()               {}
func (*Session) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *Session) GetToken() string {
	if m != nil {
		return m.Token
	}
	return ""
}

func init() {
	proto.RegisterType((*AccountExport)(nil), "nakama.console.AccountExport")
	proto.RegisterType((*AccountIdRequest)(nil), "nakama.console.AccountIdRequest")
	proto.RegisterType((*AuthenticateRequest)(nil), "nakama.console.AuthenticateRequest")
	proto.RegisterType((*Session)(nil), "nakama.console.Session")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for Console service

type ConsoleClient interface {
	// Delete all information stored for a user account.
	DeleteAccount(ctx context.Context, in *AccountIdRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
	// Export all information stored about a user account.
	ExportAccount(ctx context.Context, in *AccountIdRequest, opts ...grpc.CallOption) (*AccountExport, error)
	// Authenticate a user with username+password.
	Login(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*Session, error)
}

type consoleClient struct {
	cc *grpc.ClientConn
}

func NewConsoleClient(cc *grpc.ClientConn) ConsoleClient {
	return &consoleClient{cc}
}

func (c *consoleClient) DeleteAccount(ctx context.Context, in *AccountIdRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
	out := new(google_protobuf1.Empty)
	err := grpc.Invoke(ctx, "/nakama.console.Console/DeleteAccount", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *consoleClient) ExportAccount(ctx context.Context, in *AccountIdRequest, opts ...grpc.CallOption) (*AccountExport, error) {
	out := new(AccountExport)
	err := grpc.Invoke(ctx, "/nakama.console.Console/ExportAccount", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *consoleClient) Login(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*Session, error) {
	out := new(Session)
	err := grpc.Invoke(ctx, "/nakama.console.Console/Login", in, out, c.cc, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Console service

type ConsoleServer interface {
	// Delete all information stored for a user account.
	DeleteAccount(context.Context, *AccountIdRequest) (*google_protobuf1.Empty, error)
	// Export all information stored about a user account.
	ExportAccount(context.Context, *AccountIdRequest) (*AccountExport, error)
	// Authenticate a user with username+password.
	Login(context.Context, *AuthenticateRequest) (*Session, error)
}

func RegisterConsoleServer(s *grpc.Server, srv ConsoleServer) {
	s.RegisterService(&_Console_serviceDesc, srv)
}

func _Console_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AccountIdRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConsoleServer).DeleteAccount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/nakama.console.Console/DeleteAccount",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConsoleServer).DeleteAccount(ctx, req.(*AccountIdRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Console_ExportAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AccountIdRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConsoleServer).ExportAccount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/nakama.console.Console/ExportAccount",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConsoleServer).ExportAccount(ctx, req.(*AccountIdRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Console_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AuthenticateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConsoleServer).Login(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/nakama.console.Console/Login",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConsoleServer).Login(ctx, req.(*AuthenticateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Console_serviceDesc = grpc.ServiceDesc{
	ServiceName: "nakama.console.Console",
	HandlerType: (*ConsoleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DeleteAccount",
			Handler:    _Console_DeleteAccount_Handler,
		},
		{
			MethodName: "ExportAccount",
			Handler:    _Console_ExportAccount_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _Console_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "console/console.proto",
}

func init() { proto.RegisterFile("console/console.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 550 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xc1, 0x6e, 0xd4, 0x3c,
	0x10, 0x56, 0x52, 0xb5, 0xfb, 0xff, 0xae, 0x5a, 0x15, 0xb7, 0xa5, 0x4b, 0x4a, 0xd5, 0x90, 0x22,
	0x54, 0x56, 0x34, 0x46, 0xe1, 0xd6, 0x13, 0xdb, 0x52, 0xa1, 0x4a, 0x80, 0xd0, 0xc2, 0x89, 0x0b,
	0xf2, 0x26, 0x43, 0xe2, 0x36, 0xeb, 0x49, 0x6d, 0xa7, 0x05, 0xa1, 0x5e, 0x78, 0x04, 0x78, 0x2e,
	0x4e, 0xbc, 0x02, 0x27, 0x5e, 0x80, 0x2b, 0x4a, 0xec, 0x2d, 0xdb, 0x5d, 0x81, 0x38, 0x44, 0xd6,
	0xcc, 0xf7, 0xcd, 0x7c, 0x5f, 0x66, 0x6c, 0xb2, 0x9e, 0xa2, 0xd4, 0x58, 0x02, 0x73, 0x67, 0x5c,
	0x29, 0x34, 0x48, 0x97, 0x25, 0x3f, 0xe5, 0x23, 0x1e, 0xbb, 0x6c, 0xd0, 0xcb, 0x85, 0x29, 0xea,
	0x61, 0x9c, 0xe2, 0x88, 0x15, 0xa0, 0x50, 0xa4, 0x25, 0x1f, 0x6a, 0x66, 0x59, 0x8c, 0x57, 0xa2,
	0xf9, 0x6c, 0x6d, 0x70, 0x3b, 0x47, 0xcc, 0x4b, 0xb0, 0x59, 0x29, 0xd1, 0x70, 0x23, 0x50, 0x6a,
	0x87, 0x6e, 0x3a, 0xb4, 0x8d, 0x86, 0xf5, 0x3b, 0x06, 0xa3, 0xca, 0x7c, 0x70, 0xe0, 0x83, 0xf6,
	0x48, 0xf7, 0x72, 0x90, 0x7b, 0xfa, 0x82, 0xe7, 0x39, 0x28, 0x86, 0x55, 0x5b, 0x3e, 0xdb, 0x2a,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