// Code generated by MockGen. DO NOT EDIT.
// Source: store/store.go

// Package mock_store is a generated GoMock package.
package mock_store

import (
	json "encoding/json"
	reflect "reflect"
	time "time"

	gomock "github.com/golang/mock/gomock"
	auth "github.com/tinode/chat/server/auth"
	adapter "github.com/tinode/chat/server/db"
	media "github.com/tinode/chat/server/media"
	types "github.com/tinode/chat/server/store/types"
	validate "github.com/tinode/chat/server/validate"
)

// MockPersistentStorageInterface is a mock of PersistentStorageInterface interface.
type MockPersistentStorageInterface struct {
	ctrl     *gomock.Controller
	recorder *MockPersistentStorageInterfaceMockRecorder
}

// MockPersistentStorageInterfaceMockRecorder is the mock recorder for MockPersistentStorageInterface.
type MockPersistentStorageInterfaceMockRecorder struct {
	mock *MockPersistentStorageInterface
}

// NewMockPersistentStorageInterface creates a new mock instance.
func NewMockPersistentStorageInterface(ctrl *gomock.Controller) *MockPersistentStorageInterface {
	mock := &MockPersistentStorageInterface{ctrl: ctrl}
	mock.recorder = &MockPersistentStorageInterfaceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPersistentStorageInterface) EXPECT() *MockPersistentStorageInterfaceMockRecorder {
	return m.recorder
}

// Close mocks base method.
func (m *MockPersistentStorageInterface) Close() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close.
func (mr *MockPersistentStorageInterfaceMockRecorder) Close() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPersistentStorageInterface)(nil).Close))
}

// DbStats mocks base method.
func (m *MockPersistentStorageInterface) DbStats() func() interface{} {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DbStats")
	ret0, _ := ret[0].(func() interface{})
	return ret0
}

// DbStats indicates an expected call of DbStats.
func (mr *MockPersistentStorageInterfaceMockRecorder) DbStats() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DbStats", reflect.TypeOf((*MockPersistentStorageInterface)(nil).DbStats))
}

// GetAdapter mocks base method.
func (m *MockPersistentStorageInterface) GetAdapter() adapter.Adapter {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAdapter")
	ret0, _ := ret[0].(adapter.Adapter)
	return ret0
}

// GetAdapter indicates an expected call of GetAdapter.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetAdapter() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAdapter", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetAdapter))
}

// GetAdapterName mocks base method.
func (m *MockPersistentStorageInterface) GetAdapterName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAdapterName")
	ret0, _ := ret[0].(string)
	return ret0
}

// GetAdapterName indicates an expected call of GetAdapterName.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetAdapterName() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAdapterName", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetAdapterName))
}

// GetAdapterVersion mocks base method.
func (m *MockPersistentStorageInterface) GetAdapterVersion() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAdapterVersion")
	ret0, _ := ret[0].(int)
	return ret0
}

// GetAdapterVersion indicates an expected call of GetAdapterVersion.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetAdapterVersion() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAdapterVersion", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetAdapterVersion))
}

// GetAuthHandler mocks base method.
func (m *MockPersistentStorageInterface) GetAuthHandler(name string) auth.AuthHandler {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAuthHandler", name)
	ret0, _ := ret[0].(auth.AuthHandler)
	return ret0
}

// GetAuthHandler indicates an expected call of GetAuthHandler.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetAuthHandler(name interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthHandler", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetAuthHandler), name)
}

// GetAuthNames mocks base method.
func (m *MockPersistentStorageInterface) GetAuthNames() []string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAuthNames")
	ret0, _ := ret[0].([]string)
	return ret0
}

// GetAuthNames indicates an expected call of GetAuthNames.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetAuthNames() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthNames", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetAuthNames))
}

// GetDbVersion mocks base method.
func (m *MockPersistentStorageInterface) GetDbVersion() int {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetDbVersion")
	ret0, _ := ret[0].(int)
	return ret0
}

// GetDbVersion indicates an expected call of GetDbVersion.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetDbVersion() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDbVersion", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetDbVersion))
}

// GetLogicalAuthHandler mocks base method.
func (m *MockPersistentStorageInterface) GetLogicalAuthHandler(name string) auth.AuthHandler {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetLogicalAuthHandler", name)
	ret0, _ := ret[0].(auth.AuthHandler)
	return ret0
}

// GetLogicalAuthHandler indicates an expected call of GetLogicalAuthHandler.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetLogicalAuthHandler(name interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetLogicalAuthHandler", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetLogicalAuthHandler), name)
}

// GetMediaHandler mocks base method.
func (m *MockPersistentStorageInterface) GetMediaHandler() media.Handler {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetMediaHandler")
	ret0, _ := ret[0].(media.Handler)
	return ret0
}

// GetMediaHandler indicates an expected call of GetMediaHandler.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetMediaHandler() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMediaHandler", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetMediaHandler))
}

// GetUid mocks base method.
func (m *MockPersistentStorageInterface) GetUid() types.Uid {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetUid")
	ret0, _ := ret[0].(types.Uid)
	return ret0
}

// GetUid indicates an expected call of GetUid.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetUid() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUid", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetUid))
}

// GetUidString mocks base method.
func (m *MockPersistentStorageInterface) GetUidString() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetUidString")
	ret0, _ := ret[0].(string)
	return ret0
}

// GetUidString indicates an expected call of GetUidString.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetUidString() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUidString", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetUidString))
}

// GetValidator mocks base method.
func (m *MockPersistentStorageInterface) GetValidator(name string) validate.Validator {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetValidator", name)
	ret0, _ := ret[0].(validate.Validator)
	return ret0
}

// GetValidator indicates an expected call of GetValidator.
func (mr *MockPersistentStorageInterfaceMockRecorder) GetValidator(name interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidator", reflect.TypeOf((*MockPersistentStorageInterface)(nil).GetValidator), name)
}

// InitDb mocks base method.
func (m *MockPersistentStorageInterface) InitDb(jsonconf json.RawMessage, reset bool) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "InitDb", jsonconf, reset)
	ret0, _ := ret[0].(error)
	return ret0
}

// InitDb indicates an expected call of InitDb.
func (mr *MockPersistentStorageInterfaceMockRecorder) InitDb(jsonconf, reset interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitDb", reflect.TypeOf((*MockPersistentStorageInterface)(nil).InitDb), jsonconf, reset)
}

// IsOpen mocks base method.
func (m *MockPersistentStorageInterface) IsOpen() bool {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "IsOpen")
	ret0, _ := ret[0].(bool)
	return ret0
}

// IsOpen indicates an expected call of IsOpen.
func (mr *MockPersistentStorageInterfaceMockRecorder) IsOpen() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsOpen", reflect.TypeOf((*MockPersistentStorageInterface)(nil).IsOpen))
}

// Open mocks base method.
func (m *MockPersistentStorageInterface) Open(workerId int, jsonconf json.RawMessage) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Open", workerId, jsonconf)
	ret0, _ := ret[0].(error)
	return ret0
}

// Open indicates an expected call of Open.
func (mr *MockPersistentStorageInterfaceMockRecorder) Open(workerId, jsonconf interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockPersistentStorageInterface)(nil).Open), workerId, jsonconf)
}

// UpgradeDb mocks base method.
func (m *MockPersistentStorageInterface) UpgradeDb(jsonconf json.RawMessage) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpgradeDb", jsonconf)
	ret0, _ := ret[0].(error)
	return ret0
}

// UpgradeDb indicates an expected call of UpgradeDb.
func (mr *MockPersistentStorageInterfaceMockRecorder) UpgradeDb(jsonconf interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpgradeDb", reflect.TypeOf((*MockPersistentStorageInterface)(nil).UpgradeDb), jsonconf)
}

// UseMediaHandler mocks base method.
func (m *MockPersistentStorageInterface) UseMediaHandler(name, config string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UseMediaHandler", name, config)
	ret0, _ := ret[0].(error)
	return ret0
}

// UseMediaHandler indicates an expected call of UseMediaHandler.
func (mr *MockPersistentStorageInterfaceMockRecorder) UseMediaHandler(name, config interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseMediaHandler", reflect.TypeOf((*MockPersistentStorageInterface)(nil).UseMediaHandler), name, config)
}

// MockUsersPersistenceInterface is a mock of UsersPersistenceInterface interface.
type MockUsersPersistenceInterface struct {
	ctrl     *gomock.Controller
	recorder *MockUsersPersistenceInterfaceMockRecorder
}

// MockUsersPersistenceInterfaceMockRecorder is the mock recorder for MockUsersPersistenceInterface.
type MockUsersPersistenceInterfaceMockRecorder struct {
	mock *MockUsersPersistenceInterface
}

// NewMockUsersPersistenceInterface creates a new mock instance.
func NewMockUsersPersistenceInterface(ctrl *gomock.Controller) *MockUsersPersistenceInterface {
	mock := &MockUsersPersistenceInterface{ctrl: ctrl}
	mock.recorder = &MockUsersPersistenceInterfaceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUsersPersistenceInterface) EXPECT() *MockUsersPersistenceInterfaceMockRecorder {
	return m.recorder
}

// AddAuthRecord mocks base method.
func (m *MockUsersPersistenceInterface) AddAuthRecord(uid types.Uid, authLvl auth.Level, scheme, unique string, secret []byte, expires time.Time) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "AddAuthRecord", uid, authLvl, scheme, unique, secret, expires)
	ret0, _ := ret[0].(error)
	return ret0
}

// AddAuthRecord indicates an expected call of AddAuthRecord.
func (mr *MockUsersPersistenceInterfaceMockRecorder) AddAuthRecord(uid, authLvl, scheme, unique, secret, expires interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAuthRecord", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).AddAuthRecord), uid, authLvl, scheme, unique, secret, expires)
}

// ConfirmCred mocks base method.
func (m *MockUsersPersistenceInterface) ConfirmCred(id types.Uid, method string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "ConfirmCred", id, method)
	ret0, _ := ret[0].(error)
	return ret0
}

// ConfirmCred indicates an expected call of ConfirmCred.
func (mr *MockUsersPersistenceInterfaceMockRecorder) ConfirmCred(id, method interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfirmCred", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).ConfirmCred), id, method)
}

// Create mocks base method.
func (m *MockUsersPersistenceInterface) Create(user *types.User, private interface{}) (*types.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Create", user, private)
	ret0, _ := ret[0].(*types.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Create indicates an expected call of Create.
func (mr *MockUsersPersistenceInterfaceMockRecorder) Create(user, private interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).Create), user, private)
}

// DelAuthRecords mocks base method.
func (m *MockUsersPersistenceInterface) DelAuthRecords(uid types.Uid, scheme string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DelAuthRecords", uid, scheme)
	ret0, _ := ret[0].(error)
	return ret0
}

// DelAuthRecords indicates an expected call of DelAuthRecords.
func (mr *MockUsersPersistenceInterfaceMockRecorder) DelAuthRecords(uid, scheme interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelAuthRecords", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).DelAuthRecords), uid, scheme)
}

// DelCred mocks base method.
func (m *MockUsersPersistenceInterface) DelCred(id types.Uid, method, value string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DelCred", id, method, value)
	ret0, _ := ret[0].(error)
	return ret0
}

// DelCred indicates an expected call of DelCred.
func (mr *MockUsersPersistenceInterfaceMockRecorder) DelCred(id, method, value interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelCred", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).DelCred), id, method, value)
}

// Delete mocks base method.
func (m *MockUsersPersistenceInterface) Delete(id types.Uid, hard bool) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Delete", id, hard)
	ret0, _ := ret[0].(error)
	return ret0
}

// Delete indicates an expected call of Delete.
func (mr *MockUsersPersistenceInterfaceMockRecorder) Delete(id, hard interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).Delete), id, hard)
}

// FailCred mocks base method.
func (m *MockUsersPersistenceInterface) FailCred(id types.Uid, method string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FailCred", id, method)
	ret0, _ := ret[0].(error)
	return ret0
}

// FailCred indicates an expected call of FailCred.
func (mr *MockUsersPersistenceInterfaceMockRecorder) FailCred(id, method interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FailCred", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).FailCred), id, method)
}

// FindSubs mocks base method.
func (m *MockUsersPersistenceInterface) FindSubs(id types.Uid, required [][]string, optional []string) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindSubs", id, required, optional)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FindSubs indicates an expected call of FindSubs.
func (mr *MockUsersPersistenceInterfaceMockRecorder) FindSubs(id, required, optional interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindSubs", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).FindSubs), id, required, optional)
}

// Get mocks base method.
func (m *MockUsersPersistenceInterface) Get(uid types.Uid) (*types.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get", uid)
	ret0, _ := ret[0].(*types.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Get indicates an expected call of Get.
func (mr *MockUsersPersistenceInterfaceMockRecorder) Get(uid interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).Get), uid)
}

// GetActiveCred mocks base method.
func (m *MockUsersPersistenceInterface) GetActiveCred(id types.Uid, method string) (*types.Credential, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetActiveCred", id, method)
	ret0, _ := ret[0].(*types.Credential)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetActiveCred indicates an expected call of GetActiveCred.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetActiveCred(id, method interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveCred", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetActiveCred), id, method)
}

// GetAll mocks base method.
func (m *MockUsersPersistenceInterface) GetAll(uid ...types.Uid) ([]types.User, error) {
	m.ctrl.T.Helper()
	varargs := []interface{}{}
	for _, a := range uid {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetAll", varargs...)
	ret0, _ := ret[0].([]types.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetAll indicates an expected call of GetAll.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetAll(uid ...interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAll", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetAll), uid...)
}

// GetAllCreds mocks base method.
func (m *MockUsersPersistenceInterface) GetAllCreds(id types.Uid, method string, validatedOnly bool) ([]types.Credential, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAllCreds", id, method, validatedOnly)
	ret0, _ := ret[0].([]types.Credential)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetAllCreds indicates an expected call of GetAllCreds.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetAllCreds(id, method, validatedOnly interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllCreds", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetAllCreds), id, method, validatedOnly)
}

// GetAuthRecord mocks base method.
func (m *MockUsersPersistenceInterface) GetAuthRecord(user types.Uid, scheme string) (string, auth.Level, []byte, time.Time, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAuthRecord", user, scheme)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(auth.Level)
	ret2, _ := ret[2].([]byte)
	ret3, _ := ret[3].(time.Time)
	ret4, _ := ret[4].(error)
	return ret0, ret1, ret2, ret3, ret4
}

// GetAuthRecord indicates an expected call of GetAuthRecord.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetAuthRecord(user, scheme interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthRecord", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetAuthRecord), user, scheme)
}

// GetAuthUniqueRecord mocks base method.
func (m *MockUsersPersistenceInterface) GetAuthUniqueRecord(scheme, unique string) (types.Uid, auth.Level, []byte, time.Time, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAuthUniqueRecord", scheme, unique)
	ret0, _ := ret[0].(types.Uid)
	ret1, _ := ret[1].(auth.Level)
	ret2, _ := ret[2].([]byte)
	ret3, _ := ret[3].(time.Time)
	ret4, _ := ret[4].(error)
	return ret0, ret1, ret2, ret3, ret4
}

// GetAuthUniqueRecord indicates an expected call of GetAuthUniqueRecord.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetAuthUniqueRecord(scheme, unique interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAuthUniqueRecord", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetAuthUniqueRecord), scheme, unique)
}

// GetByCred mocks base method.
func (m *MockUsersPersistenceInterface) GetByCred(method, value string) (types.Uid, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetByCred", method, value)
	ret0, _ := ret[0].(types.Uid)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetByCred indicates an expected call of GetByCred.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetByCred(method, value interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByCred", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetByCred), method, value)
}

// GetChannels mocks base method.
func (m *MockUsersPersistenceInterface) GetChannels(id types.Uid) ([]string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetChannels", id)
	ret0, _ := ret[0].([]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetChannels indicates an expected call of GetChannels.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetChannels(id interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChannels", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetChannels), id)
}

// GetOwnTopics mocks base method.
func (m *MockUsersPersistenceInterface) GetOwnTopics(id types.Uid) ([]string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetOwnTopics", id)
	ret0, _ := ret[0].([]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetOwnTopics indicates an expected call of GetOwnTopics.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetOwnTopics(id interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOwnTopics", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetOwnTopics), id)
}

// GetSubs mocks base method.
func (m *MockUsersPersistenceInterface) GetSubs(id types.Uid) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetSubs", id)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetSubs indicates an expected call of GetSubs.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetSubs(id interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubs", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetSubs), id)
}

// GetTopics mocks base method.
func (m *MockUsersPersistenceInterface) GetTopics(id types.Uid, opts *types.QueryOpt) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetTopics", id, opts)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetTopics indicates an expected call of GetTopics.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetTopics(id, opts interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTopics", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetTopics), id, opts)
}

// GetTopicsAny mocks base method.
func (m *MockUsersPersistenceInterface) GetTopicsAny(id types.Uid, opts *types.QueryOpt) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetTopicsAny", id, opts)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetTopicsAny indicates an expected call of GetTopicsAny.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetTopicsAny(id, opts interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTopicsAny", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetTopicsAny), id, opts)
}

// GetUnreadCount mocks base method.
func (m *MockUsersPersistenceInterface) GetUnreadCount(ids ...types.Uid) (map[types.Uid]int, error) {
	m.ctrl.T.Helper()
	varargs := []interface{}{}
	for _, a := range ids {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetUnreadCount", varargs...)
	ret0, _ := ret[0].(map[types.Uid]int)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetUnreadCount indicates an expected call of GetUnreadCount.
func (mr *MockUsersPersistenceInterfaceMockRecorder) GetUnreadCount(ids ...interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUnreadCount", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).GetUnreadCount), ids...)
}

// Update mocks base method.
func (m *MockUsersPersistenceInterface) Update(uid types.Uid, update map[string]interface{}) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Update", uid, update)
	ret0, _ := ret[0].(error)
	return ret0
}

// Update indicates an expected call of Update.
func (mr *MockUsersPersistenceInterfaceMockRecorder) Update(uid, update interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).Update), uid, update)
}

// UpdateAuthRecord mocks base method.
func (m *MockUsersPersistenceInterface) UpdateAuthRecord(uid types.Uid, authLvl auth.Level, scheme, unique string, secret []byte, expires time.Time) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateAuthRecord", uid, authLvl, scheme, unique, secret, expires)
	ret0, _ := ret[0].(error)
	return ret0
}

// UpdateAuthRecord indicates an expected call of UpdateAuthRecord.
func (mr *MockUsersPersistenceInterfaceMockRecorder) UpdateAuthRecord(uid, authLvl, scheme, unique, secret, expires interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAuthRecord", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).UpdateAuthRecord), uid, authLvl, scheme, unique, secret, expires)
}

// UpdateLastSeen mocks base method.
func (m *MockUsersPersistenceInterface) UpdateLastSeen(uid types.Uid, userAgent string, when time.Time) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateLastSeen", uid, userAgent, when)
	ret0, _ := ret[0].(error)
	return ret0
}

// UpdateLastSeen indicates an expected call of UpdateLastSeen.
func (mr *MockUsersPersistenceInterfaceMockRecorder) UpdateLastSeen(uid, userAgent, when interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateLastSeen", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).UpdateLastSeen), uid, userAgent, when)
}

// UpdateState mocks base method.
func (m *MockUsersPersistenceInterface) UpdateState(uid types.Uid, state types.ObjState) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateState", uid, state)
	ret0, _ := ret[0].(error)
	return ret0
}

// UpdateState indicates an expected call of UpdateState.
func (mr *MockUsersPersistenceInterfaceMockRecorder) UpdateState(uid, state interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateState", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).UpdateState), uid, state)
}

// UpdateTags mocks base method.
func (m *MockUsersPersistenceInterface) UpdateTags(uid types.Uid, add, remove, reset []string) ([]string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateTags", uid, add, remove, reset)
	ret0, _ := ret[0].([]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UpdateTags indicates an expected call of UpdateTags.
func (mr *MockUsersPersistenceInterfaceMockRecorder) UpdateTags(uid, add, remove, reset interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTags", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).UpdateTags), uid, add, remove, reset)
}

// UpsertCred mocks base method.
func (m *MockUsersPersistenceInterface) UpsertCred(cred *types.Credential) (bool, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpsertCred", cred)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// UpsertCred indicates an expected call of UpsertCred.
func (mr *MockUsersPersistenceInterfaceMockRecorder) UpsertCred(cred interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertCred", reflect.TypeOf((*MockUsersPersistenceInterface)(nil).UpsertCred), cred)
}

// MockTopicsPersistenceInterface is a mock of TopicsPersistenceInterface interface.
type MockTopicsPersistenceInterface struct {
	ctrl     *gomock.Controller
	recorder *MockTopicsPersistenceInterfaceMockRecorder
}

// MockTopicsPersistenceInterfaceMockRecorder is the mock recorder for MockTopicsPersistenceInterface.
type MockTopicsPersistenceInterfaceMockRecorder struct {
	mock *MockTopicsPersistenceInterface
}

// NewMockTopicsPersistenceInterface creates a new mock instance.
func NewMockTopicsPersistenceInterface(ctrl *gomock.Controller) *MockTopicsPersistenceInterface {
	mock := &MockTopicsPersistenceInterface{ctrl: ctrl}
	mock.recorder = &MockTopicsPersistenceInterfaceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTopicsPersistenceInterface) EXPECT() *MockTopicsPersistenceInterfaceMockRecorder {
	return m.recorder
}

// Create mocks base method.
func (m *MockTopicsPersistenceInterface) Create(topic *types.Topic, owner types.Uid, private interface{}) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Create", topic, owner, private)
	ret0, _ := ret[0].(error)
	return ret0
}

// Create indicates an expected call of Create.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) Create(topic, owner, private interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).Create), topic, owner, private)
}

// CreateP2P mocks base method.
func (m *MockTopicsPersistenceInterface) CreateP2P(initiator, invited *types.Subscription) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "CreateP2P", initiator, invited)
	ret0, _ := ret[0].(error)
	return ret0
}

// CreateP2P indicates an expected call of CreateP2P.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) CreateP2P(initiator, invited interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateP2P", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).CreateP2P), initiator, invited)
}

// Delete mocks base method.
func (m *MockTopicsPersistenceInterface) Delete(topic string, isChan, hard bool) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Delete", topic, isChan, hard)
	ret0, _ := ret[0].(error)
	return ret0
}

// Delete indicates an expected call of Delete.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) Delete(topic, isChan, hard interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).Delete), topic, isChan, hard)
}

// Get mocks base method.
func (m *MockTopicsPersistenceInterface) Get(topic string) (*types.Topic, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get", topic)
	ret0, _ := ret[0].(*types.Topic)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Get indicates an expected call of Get.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) Get(topic interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).Get), topic)
}

// GetSubs mocks base method.
func (m *MockTopicsPersistenceInterface) GetSubs(topic string, opts *types.QueryOpt) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetSubs", topic, opts)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetSubs indicates an expected call of GetSubs.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) GetSubs(topic, opts interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubs", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).GetSubs), topic, opts)
}

// GetSubsAny mocks base method.
func (m *MockTopicsPersistenceInterface) GetSubsAny(topic string, opts *types.QueryOpt) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetSubsAny", topic, opts)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetSubsAny indicates an expected call of GetSubsAny.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) GetSubsAny(topic, opts interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubsAny", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).GetSubsAny), topic, opts)
}

// GetUsers mocks base method.
func (m *MockTopicsPersistenceInterface) GetUsers(topic string, opts *types.QueryOpt) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetUsers", topic, opts)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetUsers indicates an expected call of GetUsers.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) GetUsers(topic, opts interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUsers", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).GetUsers), topic, opts)
}

// GetUsersAny mocks base method.
func (m *MockTopicsPersistenceInterface) GetUsersAny(topic string, opts *types.QueryOpt) ([]types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetUsersAny", topic, opts)
	ret0, _ := ret[0].([]types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetUsersAny indicates an expected call of GetUsersAny.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) GetUsersAny(topic, opts interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUsersAny", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).GetUsersAny), topic, opts)
}

// OwnerChange mocks base method.
func (m *MockTopicsPersistenceInterface) OwnerChange(topic string, newOwner types.Uid) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "OwnerChange", topic, newOwner)
	ret0, _ := ret[0].(error)
	return ret0
}

// OwnerChange indicates an expected call of OwnerChange.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) OwnerChange(topic, newOwner interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OwnerChange", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).OwnerChange), topic, newOwner)
}

// Update mocks base method.
func (m *MockTopicsPersistenceInterface) Update(topic string, update map[string]interface{}) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Update", topic, update)
	ret0, _ := ret[0].(error)
	return ret0
}

// Update indicates an expected call of Update.
func (mr *MockTopicsPersistenceInterfaceMockRecorder) Update(topic, update interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockTopicsPersistenceInterface)(nil).Update), topic, update)
}

// MockSubsPersistenceInterface is a mock of SubsPersistenceInterface interface.
type MockSubsPersistenceInterface struct {
	ctrl     *gomock.Controller
	recorder *MockSubsPersistenceInterfaceMockRecorder
}

// MockSubsPersistenceInterfaceMockRecorder is the mock recorder for MockSubsPersistenceInterface.
type MockSubsPersistenceInterfaceMockRecorder struct {
	mock *MockSubsPersistenceInterface
}

// NewMockSubsPersistenceInterface creates a new mock instance.
func NewMockSubsPersistenceInterface(ctrl *gomock.Controller) *MockSubsPersistenceInterface {
	mock := &MockSubsPersistenceInterface{ctrl: ctrl}
	mock.recorder = &MockSubsPersistenceInterfaceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSubsPersistenceInterface) EXPECT() *MockSubsPersistenceInterfaceMockRecorder {
	return m.recorder
}

// Create mocks base method.
func (m *MockSubsPersistenceInterface) Create(subs ...*types.Subscription) error {
	m.ctrl.T.Helper()
	varargs := []interface{}{}
	for _, a := range subs {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "Create", varargs...)
	ret0, _ := ret[0].(error)
	return ret0
}

// Create indicates an expected call of Create.
func (mr *MockSubsPersistenceInterfaceMockRecorder) Create(subs ...interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockSubsPersistenceInterface)(nil).Create), subs...)
}

// Delete mocks base method.
func (m *MockSubsPersistenceInterface) Delete(topic string, user types.Uid) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Delete", topic, user)
	ret0, _ := ret[0].(error)
	return ret0
}

// Delete indicates an expected call of Delete.
func (mr *MockSubsPersistenceInterfaceMockRecorder) Delete(topic, user interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockSubsPersistenceInterface)(nil).Delete), topic, user)
}

// Get mocks base method.
func (m *MockSubsPersistenceInterface) Get(topic string, user types.Uid, keepDeleted bool) (*types.Subscription, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get", topic, user, keepDeleted)
	ret0, _ := ret[0].(*types.Subscription)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Get indicates an expected call of Get.
func (mr *MockSubsPersistenceInterfaceMockRecorder) Get(topic, user, keepDeleted interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockSubsPersistenceInterface)(nil).Get), topic, user, keepDeleted)
}

// Update mocks base method.
func (m *MockSubsPersistenceInterface) Update(topic string, user types.Uid, update map[string]interface{}) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Update", topic, user, update)
	ret0, _ := ret[0].(error)
	return ret0
}

// Update indicates an expected call of Update.
func (mr *MockSubsPersistenceInterfaceMockRecorder) Update(topic, user, update interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockSubsPersistenceInterface)(nil).Update), topic, user, update)
}

// MockMessagesPersistenceInterface is a mock of MessagesPersistenceInterface interface.
type MockMessagesPersistenceInterface struct {
	ctrl     *gomock.Controller
	recorder *MockMessagesPersistenceInterfaceMockRecorder
}

// MockMessagesPersistenceInterfaceMockRecorder is the mock recorder for MockMessagesPersistenceInterface.
type MockMessagesPersistenceInterfaceMockRecorder struct {
	mock *MockMessagesPersistenceInterface
}

// NewMockMessagesPersistenceInterface creates a new mock instance.
func NewMockMessagesPersistenceInterface(ctrl *gomock.Controller) *MockMessagesPersistenceInterface {
	mock := &MockMessagesPersistenceInterface{ctrl: ctrl}
	mock.recorder = &MockMessagesPersistenceInterfaceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockMessagesPersistenceInterface) EXPECT() *MockMessagesPersistenceInterfaceMockRecorder {
	return m.recorder
}

// DeleteList mocks base method.
func (m *MockMessagesPersistenceInterface) DeleteList(topic string, delID int, forUser types.Uid, ranges []types.Range) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteList", topic, delID, forUser, ranges)
	ret0, _ := ret[0].(error)
	return ret0
}

// DeleteList indicates an expected call of DeleteList.
func (mr *MockMessagesPersistenceInterfaceMockRecorder) DeleteList(topic, delID, forUser, ranges interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteList", reflect.TypeOf((*MockMessagesPersistenceInterface)(nil).DeleteList), topic, delID, forUser, ranges)
}

// GetAll mocks base method.
func (m *MockMessagesPersistenceInterface) GetAll(topic string, forUser types.Uid, opt *types.QueryOpt) ([]types.Message, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetAll", topic, forUser, opt)
	ret0, _ := ret[0].([]types.Message)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetAll indicates an expected call of GetAll.
func (mr *MockMessagesPersistenceInterfaceMockRecorder) GetAll(topic, forUser, opt interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAll", reflect.TypeOf((*MockMessagesPersistenceInterface)(nil).GetAll), topic, forUser, opt)
}

// GetDeleted mocks base method.
func (m *MockMessagesPersistenceInterface) GetDeleted(topic string, forUser types.Uid, opt *types.QueryOpt) ([]types.Range, int, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetDeleted", topic, forUser, opt)
	ret0, _ := ret[0].([]types.Range)
	ret1, _ := ret[1].(int)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// GetDeleted indicates an expected call of GetDeleted.
func (mr *MockMessagesPersistenceInterfaceMockRecorder) GetDeleted(topic, forUser, opt interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDeleted", reflect.TypeOf((*MockMessagesPersistenceInterface)(nil).GetDeleted), topic, forUser, opt)
}

// Save mocks base method.
func (m *MockMessagesPersistenceInterface) Save(msg *types.Message, attachmentURLs []string, readBySender bool) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Save", msg, attachmentURLs, readBySender)
	ret0, _ := ret[0].(error)
	return ret0
}

// Save indicates an expected call of Save.
func (mr *MockMessagesPersistenceInterfaceMockRecorder) Save(msg, attachmentURLs, readBySender interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockMessagesPersistenceInterface)(nil).Save), msg, attachmentURLs, readBySender)
}

// MockDevicePersistenceInterface is a mock of DevicePersistenceInterface interface.
type MockDevicePersistenceInterface struct {
	ctrl     *gomock.Controller
	recorder *MockDevicePersistenceInterfaceMockRecorder
}

// MockDevicePersistenceInterfaceMockRecorder is the mock recorder for MockDevicePersistenceInterface.
type MockDevicePersistenceInterfaceMockRecorder struct {
	mock *MockDevicePersistenceInterface
}

// NewMockDevicePersistenceInterface creates a new mock instance.
func NewMockDevicePersistenceInterface(ctrl *gomock.Controller) *MockDevicePersistenceInterface {
	mock := &MockDevicePersistenceInterface{ctrl: ctrl}
	mock.recorder = &MockDevicePersistenceInterfaceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockDevicePersistenceInterface) EXPECT() *MockDevicePersistenceInterfaceMockRecorder {
	return m.recorder
}

// Delete mocks base method.
func (m *MockDevicePersistenceInterface) Delete(uid types.Uid, deviceID string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Delete", uid, deviceID)
	ret0, _ := ret[0].(error)
	return ret0
}

// Delete indicates an expected call of Delete.
func (mr *MockDevicePersistenceInterfaceMockRecorder) Delete(uid, deviceID interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockDevicePersistenceInterface)(nil).Delete), uid, deviceID)
}

// GetAll mocks base method.
func (m *MockDevicePersistenceInterface) GetAll(uid ...types.Uid) (map[types.Uid][]types.DeviceDef, int, error) {
	m.ctrl.T.Helper()
	varargs := []interface{}{}
	for _, a := range uid {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetAll", varargs...)
	ret0, _ := ret[0].(map[types.Uid][]types.DeviceDef)
	ret1, _ := ret[1].(int)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// GetAll indicates an expected call of GetAll.
func (mr *MockDevicePersistenceInterfaceMockRecorder) GetAll(uid ...interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAll", reflect.TypeOf((*MockDevicePersistenceInterface)(nil).GetAll), uid...)
}

// Update mocks base method.
func (m *MockDevicePersistenceInterface) Update(uid types.Uid, oldDeviceID string, dev *types.DeviceDef) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Update", uid, oldDeviceID, dev)
	ret0, _ := ret[0].(error)
	return ret0
}

// Update indicates an expected call of Update.
func (mr *MockDevicePersistenceInterfaceMockRecorder) Update(uid, oldDeviceID, dev interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockDevicePersistenceInterface)(nil).Update), uid, oldDeviceID, dev)
}

// MockFilePersistenceInterface is a mock of FilePersistenceInterface interface.
type MockFilePersistenceInterface struct {
	ctrl     *gomock.Controller
	recorder *MockFilePersistenceInterfaceMockRecorder
}

// MockFilePersistenceInterfaceMockRecorder is the mock recorder for MockFilePersistenceInterface.
type MockFilePersistenceInterfaceMockRecorder struct {
	mock *MockFilePersistenceInterface
}

// NewMockFilePersistenceInterface creates a new mock instance.
func NewMockFilePersistenceInterface(ctrl *gomock.Controller) *MockFilePersistenceInterface {
	mock := &MockFilePersistenceInterface{ctrl: ctrl}
	mock.recorder = &MockFilePersistenceInterfaceMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockFilePersistenceInterface) EXPECT() *MockFilePersistenceInterfaceMockRecorder {
	return m.recorder
}

// DeleteUnused mocks base method.
func (m *MockFilePersistenceInterface) DeleteUnused(olderThan time.Time, limit int) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DeleteUnused", olderThan, limit)
	ret0, _ := ret[0].(error)
	return ret0
}

// DeleteUnused indicates an expected call of DeleteUnused.
func (mr *MockFilePersistenceInterfaceMockRecorder) DeleteUnused(olderThan, limit interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUnused", reflect.TypeOf((*MockFilePersistenceInterface)(nil).DeleteUnused), olderThan, limit)
}

// FinishUpload mocks base method.
func (m *MockFilePersistenceInterface) FinishUpload(fd *types.FileDef, success bool, size int64) (*types.FileDef, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FinishUpload", fd, success, size)
	ret0, _ := ret[0].(*types.FileDef)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FinishUpload indicates an expected call of FinishUpload.
func (mr *MockFilePersistenceInterfaceMockRecorder) FinishUpload(fd, success, size interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishUpload", reflect.TypeOf((*MockFilePersistenceInterface)(nil).FinishUpload), fd, success, size)
}

// Get mocks base method.
func (m *MockFilePersistenceInterface) Get(fid string) (*types.FileDef, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Get", fid)
	ret0, _ := ret[0].(*types.FileDef)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Get indicates an expected call of Get.
func (mr *MockFilePersistenceInterfaceMockRecorder) Get(fid interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockFilePersistenceInterface)(nil).Get), fid)
}

// LinkAttachments mocks base method.
func (m *MockFilePersistenceInterface) LinkAttachments(topic string, msgId types.Uid, attachments []string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LinkAttachments", topic, msgId, attachments)
	ret0, _ := ret[0].(error)
	return ret0
}

// LinkAttachments indicates an expected call of LinkAttachments.
func (mr *MockFilePersistenceInterfaceMockRecorder) LinkAttachments(topic, msgId, attachments interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LinkAttachments", reflect.TypeOf((*MockFilePersistenceInterface)(nil).LinkAttachments), topic, msgId, attachments)
}

// StartUpload mocks base method.
func (m *MockFilePersistenceInterface) StartUpload(fd *types.FileDef) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "StartUpload", fd)
	ret0, _ := ret[0].(error)
	return ret0
}

// StartUpload indicates an expected call of StartUpload.
func (mr *MockFilePersistenceInterfaceMockRecorder) StartUpload(fd interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartUpload", reflect.TypeOf((*MockFilePersistenceInterface)(nil).StartUpload), fd)
}
