// Code generated by mockery. DO NOT EDIT.

package mock_clientspace

import (
	anystorage "github.com/anyproto/anytype-heart/space/spacecore/storage/anystorage"

	commonspace "github.com/anyproto/any-sync/commonspace"

	context "context"

	crypto "github.com/anyproto/any-sync/util/crypto"

	domain "github.com/anyproto/anytype-heart/core/domain"

	headsync "github.com/anyproto/any-sync/commonspace/headsync"

	keyvalueservice "github.com/anyproto/anytype-heart/space/clientspace/keyvalueservice"

	mock "github.com/stretchr/testify/mock"

	objectcache "github.com/anyproto/anytype-heart/core/block/object/objectcache"

	objecttreebuilder "github.com/anyproto/any-sync/commonspace/objecttreebuilder"

	payloadcreator "github.com/anyproto/anytype-heart/core/block/object/payloadcreator"

	smartblock "github.com/anyproto/anytype-heart/core/block/editor/smartblock"

	threads "github.com/anyproto/anytype-heart/pkg/lib/threads"

	treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage"
)

// MockSpace is an autogenerated mock type for the Space type
type MockSpace struct {
	mock.Mock
}

type MockSpace_Expecter struct {
	mock *mock.Mock
}

func (_m *MockSpace) EXPECT() *MockSpace_Expecter {
	return &MockSpace_Expecter{mock: &_m.Mock}
}

// Close provides a mock function with given fields: ctx
func (_m *MockSpace) Close(ctx context.Context) error {
	ret := _m.Called(ctx)

	if len(ret) == 0 {
		panic("no return value specified for Close")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context) error); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
type MockSpace_Close_Call struct {
	*mock.Call
}

// Close is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockSpace_Expecter) Close(ctx interface{}) *MockSpace_Close_Call {
	return &MockSpace_Close_Call{Call: _e.mock.On("Close", ctx)}
}

func (_c *MockSpace_Close_Call) Run(run func(ctx context.Context)) *MockSpace_Close_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *MockSpace_Close_Call) Return(_a0 error) *MockSpace_Close_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_Close_Call) RunAndReturn(run func(context.Context) error) *MockSpace_Close_Call {
	_c.Call.Return(run)
	return _c
}

// CloseBlocks provides a mock function with given fields:
func (_m *MockSpace) CloseBlocks() {
	_m.Called()
}

// MockSpace_CloseBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CloseBlocks'
type MockSpace_CloseBlocks_Call struct {
	*mock.Call
}

// CloseBlocks is a helper method to define mock.On call
func (_e *MockSpace_Expecter) CloseBlocks() *MockSpace_CloseBlocks_Call {
	return &MockSpace_CloseBlocks_Call{Call: _e.mock.On("CloseBlocks")}
}

func (_c *MockSpace_CloseBlocks_Call) Run(run func()) *MockSpace_CloseBlocks_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_CloseBlocks_Call) Return() *MockSpace_CloseBlocks_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSpace_CloseBlocks_Call) RunAndReturn(run func()) *MockSpace_CloseBlocks_Call {
	_c.Call.Return(run)
	return _c
}

// CommonSpace provides a mock function with given fields:
func (_m *MockSpace) CommonSpace() commonspace.Space {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for CommonSpace")
	}

	var r0 commonspace.Space
	if rf, ok := ret.Get(0).(func() commonspace.Space); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(commonspace.Space)
		}
	}

	return r0
}

// MockSpace_CommonSpace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommonSpace'
type MockSpace_CommonSpace_Call struct {
	*mock.Call
}

// CommonSpace is a helper method to define mock.On call
func (_e *MockSpace_Expecter) CommonSpace() *MockSpace_CommonSpace_Call {
	return &MockSpace_CommonSpace_Call{Call: _e.mock.On("CommonSpace")}
}

func (_c *MockSpace_CommonSpace_Call) Run(run func()) *MockSpace_CommonSpace_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_CommonSpace_Call) Return(_a0 commonspace.Space) *MockSpace_CommonSpace_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_CommonSpace_Call) RunAndReturn(run func() commonspace.Space) *MockSpace_CommonSpace_Call {
	_c.Call.Return(run)
	return _c
}

// CreateMandatoryObjects provides a mock function with given fields: ctx, space
func (_m *MockSpace) CreateMandatoryObjects(ctx context.Context, space smartblock.Space) error {
	ret := _m.Called(ctx, space)

	if len(ret) == 0 {
		panic("no return value specified for CreateMandatoryObjects")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, smartblock.Space) error); ok {
		r0 = rf(ctx, space)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_CreateMandatoryObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMandatoryObjects'
type MockSpace_CreateMandatoryObjects_Call struct {
	*mock.Call
}

// CreateMandatoryObjects is a helper method to define mock.On call
//   - ctx context.Context
//   - space smartblock.Space
func (_e *MockSpace_Expecter) CreateMandatoryObjects(ctx interface{}, space interface{}) *MockSpace_CreateMandatoryObjects_Call {
	return &MockSpace_CreateMandatoryObjects_Call{Call: _e.mock.On("CreateMandatoryObjects", ctx, space)}
}

func (_c *MockSpace_CreateMandatoryObjects_Call) Run(run func(ctx context.Context, space smartblock.Space)) *MockSpace_CreateMandatoryObjects_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(smartblock.Space))
	})
	return _c
}

func (_c *MockSpace_CreateMandatoryObjects_Call) Return(err error) *MockSpace_CreateMandatoryObjects_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockSpace_CreateMandatoryObjects_Call) RunAndReturn(run func(context.Context, smartblock.Space) error) *MockSpace_CreateMandatoryObjects_Call {
	_c.Call.Return(run)
	return _c
}

// CreateTreeObject provides a mock function with given fields: ctx, params
func (_m *MockSpace) CreateTreeObject(ctx context.Context, params objectcache.TreeCreationParams) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, params)

	if len(ret) == 0 {
		panic("no return value specified for CreateTreeObject")
	}

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, objectcache.TreeCreationParams) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, params)
	}
	if rf, ok := ret.Get(0).(func(context.Context, objectcache.TreeCreationParams) smartblock.SmartBlock); ok {
		r0 = rf(ctx, params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, objectcache.TreeCreationParams) error); ok {
		r1 = rf(ctx, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_CreateTreeObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTreeObject'
type MockSpace_CreateTreeObject_Call struct {
	*mock.Call
}

// CreateTreeObject is a helper method to define mock.On call
//   - ctx context.Context
//   - params objectcache.TreeCreationParams
func (_e *MockSpace_Expecter) CreateTreeObject(ctx interface{}, params interface{}) *MockSpace_CreateTreeObject_Call {
	return &MockSpace_CreateTreeObject_Call{Call: _e.mock.On("CreateTreeObject", ctx, params)}
}

func (_c *MockSpace_CreateTreeObject_Call) Run(run func(ctx context.Context, params objectcache.TreeCreationParams)) *MockSpace_CreateTreeObject_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(objectcache.TreeCreationParams))
	})
	return _c
}

func (_c *MockSpace_CreateTreeObject_Call) Return(sb smartblock.SmartBlock, err error) *MockSpace_CreateTreeObject_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockSpace_CreateTreeObject_Call) RunAndReturn(run func(context.Context, objectcache.TreeCreationParams) (smartblock.SmartBlock, error)) *MockSpace_CreateTreeObject_Call {
	_c.Call.Return(run)
	return _c
}

// CreateTreeObjectWithPayload provides a mock function with given fields: ctx, payload, initFunc
func (_m *MockSpace) CreateTreeObjectWithPayload(ctx context.Context, payload treestorage.TreeStorageCreatePayload, initFunc objectcache.InitFunc) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, payload, initFunc)

	if len(ret) == 0 {
		panic("no return value specified for CreateTreeObjectWithPayload")
	}

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, treestorage.TreeStorageCreatePayload, objectcache.InitFunc) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, payload, initFunc)
	}
	if rf, ok := ret.Get(0).(func(context.Context, treestorage.TreeStorageCreatePayload, objectcache.InitFunc) smartblock.SmartBlock); ok {
		r0 = rf(ctx, payload, initFunc)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, treestorage.TreeStorageCreatePayload, objectcache.InitFunc) error); ok {
		r1 = rf(ctx, payload, initFunc)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_CreateTreeObjectWithPayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTreeObjectWithPayload'
type MockSpace_CreateTreeObjectWithPayload_Call struct {
	*mock.Call
}

// CreateTreeObjectWithPayload is a helper method to define mock.On call
//   - ctx context.Context
//   - payload treestorage.TreeStorageCreatePayload
//   - initFunc objectcache.InitFunc
func (_e *MockSpace_Expecter) CreateTreeObjectWithPayload(ctx interface{}, payload interface{}, initFunc interface{}) *MockSpace_CreateTreeObjectWithPayload_Call {
	return &MockSpace_CreateTreeObjectWithPayload_Call{Call: _e.mock.On("CreateTreeObjectWithPayload", ctx, payload, initFunc)}
}

func (_c *MockSpace_CreateTreeObjectWithPayload_Call) Run(run func(ctx context.Context, payload treestorage.TreeStorageCreatePayload, initFunc objectcache.InitFunc)) *MockSpace_CreateTreeObjectWithPayload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(treestorage.TreeStorageCreatePayload), args[2].(objectcache.InitFunc))
	})
	return _c
}

func (_c *MockSpace_CreateTreeObjectWithPayload_Call) Return(sb smartblock.SmartBlock, err error) *MockSpace_CreateTreeObjectWithPayload_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockSpace_CreateTreeObjectWithPayload_Call) RunAndReturn(run func(context.Context, treestorage.TreeStorageCreatePayload, objectcache.InitFunc) (smartblock.SmartBlock, error)) *MockSpace_CreateTreeObjectWithPayload_Call {
	_c.Call.Return(run)
	return _c
}

// CreateTreePayload provides a mock function with given fields: ctx, params
func (_m *MockSpace) CreateTreePayload(ctx context.Context, params payloadcreator.PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error) {
	ret := _m.Called(ctx, params)

	if len(ret) == 0 {
		panic("no return value specified for CreateTreePayload")
	}

	var r0 treestorage.TreeStorageCreatePayload
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, payloadcreator.PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error)); ok {
		return rf(ctx, params)
	}
	if rf, ok := ret.Get(0).(func(context.Context, payloadcreator.PayloadCreationParams) treestorage.TreeStorageCreatePayload); ok {
		r0 = rf(ctx, params)
	} else {
		r0 = ret.Get(0).(treestorage.TreeStorageCreatePayload)
	}

	if rf, ok := ret.Get(1).(func(context.Context, payloadcreator.PayloadCreationParams) error); ok {
		r1 = rf(ctx, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_CreateTreePayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateTreePayload'
type MockSpace_CreateTreePayload_Call struct {
	*mock.Call
}

// CreateTreePayload is a helper method to define mock.On call
//   - ctx context.Context
//   - params payloadcreator.PayloadCreationParams
func (_e *MockSpace_Expecter) CreateTreePayload(ctx interface{}, params interface{}) *MockSpace_CreateTreePayload_Call {
	return &MockSpace_CreateTreePayload_Call{Call: _e.mock.On("CreateTreePayload", ctx, params)}
}

func (_c *MockSpace_CreateTreePayload_Call) Run(run func(ctx context.Context, params payloadcreator.PayloadCreationParams)) *MockSpace_CreateTreePayload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(payloadcreator.PayloadCreationParams))
	})
	return _c
}

func (_c *MockSpace_CreateTreePayload_Call) Return(_a0 treestorage.TreeStorageCreatePayload, _a1 error) *MockSpace_CreateTreePayload_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockSpace_CreateTreePayload_Call) RunAndReturn(run func(context.Context, payloadcreator.PayloadCreationParams) (treestorage.TreeStorageCreatePayload, error)) *MockSpace_CreateTreePayload_Call {
	_c.Call.Return(run)
	return _c
}

// DebugAllHeads provides a mock function with given fields:
func (_m *MockSpace) DebugAllHeads() []headsync.TreeHeads {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for DebugAllHeads")
	}

	var r0 []headsync.TreeHeads
	if rf, ok := ret.Get(0).(func() []headsync.TreeHeads); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]headsync.TreeHeads)
		}
	}

	return r0
}

// MockSpace_DebugAllHeads_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DebugAllHeads'
type MockSpace_DebugAllHeads_Call struct {
	*mock.Call
}

// DebugAllHeads is a helper method to define mock.On call
func (_e *MockSpace_Expecter) DebugAllHeads() *MockSpace_DebugAllHeads_Call {
	return &MockSpace_DebugAllHeads_Call{Call: _e.mock.On("DebugAllHeads")}
}

func (_c *MockSpace_DebugAllHeads_Call) Run(run func()) *MockSpace_DebugAllHeads_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_DebugAllHeads_Call) Return(_a0 []headsync.TreeHeads) *MockSpace_DebugAllHeads_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_DebugAllHeads_Call) RunAndReturn(run func() []headsync.TreeHeads) *MockSpace_DebugAllHeads_Call {
	_c.Call.Return(run)
	return _c
}

// DeleteTree provides a mock function with given fields: ctx, id
func (_m *MockSpace) DeleteTree(ctx context.Context, id string) error {
	ret := _m.Called(ctx, id)

	if len(ret) == 0 {
		panic("no return value specified for DeleteTree")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = rf(ctx, id)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_DeleteTree_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTree'
type MockSpace_DeleteTree_Call struct {
	*mock.Call
}

// DeleteTree is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *MockSpace_Expecter) DeleteTree(ctx interface{}, id interface{}) *MockSpace_DeleteTree_Call {
	return &MockSpace_DeleteTree_Call{Call: _e.mock.On("DeleteTree", ctx, id)}
}

func (_c *MockSpace_DeleteTree_Call) Run(run func(ctx context.Context, id string)) *MockSpace_DeleteTree_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockSpace_DeleteTree_Call) Return(err error) *MockSpace_DeleteTree_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockSpace_DeleteTree_Call) RunAndReturn(run func(context.Context, string) error) *MockSpace_DeleteTree_Call {
	_c.Call.Return(run)
	return _c
}

// DeriveObjectID provides a mock function with given fields: ctx, uniqueKey
func (_m *MockSpace) DeriveObjectID(ctx context.Context, uniqueKey domain.UniqueKey) (string, error) {
	ret := _m.Called(ctx, uniqueKey)

	if len(ret) == 0 {
		panic("no return value specified for DeriveObjectID")
	}

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, domain.UniqueKey) (string, error)); ok {
		return rf(ctx, uniqueKey)
	}
	if rf, ok := ret.Get(0).(func(context.Context, domain.UniqueKey) string); ok {
		r0 = rf(ctx, uniqueKey)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context, domain.UniqueKey) error); ok {
		r1 = rf(ctx, uniqueKey)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_DeriveObjectID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveObjectID'
type MockSpace_DeriveObjectID_Call struct {
	*mock.Call
}

// DeriveObjectID is a helper method to define mock.On call
//   - ctx context.Context
//   - uniqueKey domain.UniqueKey
func (_e *MockSpace_Expecter) DeriveObjectID(ctx interface{}, uniqueKey interface{}) *MockSpace_DeriveObjectID_Call {
	return &MockSpace_DeriveObjectID_Call{Call: _e.mock.On("DeriveObjectID", ctx, uniqueKey)}
}

func (_c *MockSpace_DeriveObjectID_Call) Run(run func(ctx context.Context, uniqueKey domain.UniqueKey)) *MockSpace_DeriveObjectID_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.UniqueKey))
	})
	return _c
}

func (_c *MockSpace_DeriveObjectID_Call) Return(id string, err error) *MockSpace_DeriveObjectID_Call {
	_c.Call.Return(id, err)
	return _c
}

func (_c *MockSpace_DeriveObjectID_Call) RunAndReturn(run func(context.Context, domain.UniqueKey) (string, error)) *MockSpace_DeriveObjectID_Call {
	_c.Call.Return(run)
	return _c
}

// DeriveObjectIDs provides a mock function with given fields: ctx
func (_m *MockSpace) DeriveObjectIDs(ctx context.Context) (threads.DerivedSmartblockIds, error) {
	ret := _m.Called(ctx)

	if len(ret) == 0 {
		panic("no return value specified for DeriveObjectIDs")
	}

	var r0 threads.DerivedSmartblockIds
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context) (threads.DerivedSmartblockIds, error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) threads.DerivedSmartblockIds); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Get(0).(threads.DerivedSmartblockIds)
	}

	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
		r1 = rf(ctx)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_DeriveObjectIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveObjectIDs'
type MockSpace_DeriveObjectIDs_Call struct {
	*mock.Call
}

// DeriveObjectIDs is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockSpace_Expecter) DeriveObjectIDs(ctx interface{}) *MockSpace_DeriveObjectIDs_Call {
	return &MockSpace_DeriveObjectIDs_Call{Call: _e.mock.On("DeriveObjectIDs", ctx)}
}

func (_c *MockSpace_DeriveObjectIDs_Call) Run(run func(ctx context.Context)) *MockSpace_DeriveObjectIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *MockSpace_DeriveObjectIDs_Call) Return(objIDs threads.DerivedSmartblockIds, err error) *MockSpace_DeriveObjectIDs_Call {
	_c.Call.Return(objIDs, err)
	return _c
}

func (_c *MockSpace_DeriveObjectIDs_Call) RunAndReturn(run func(context.Context) (threads.DerivedSmartblockIds, error)) *MockSpace_DeriveObjectIDs_Call {
	_c.Call.Return(run)
	return _c
}

// DeriveObjectIdWithAccountSignature provides a mock function with given fields: ctx, uniqueKey
func (_m *MockSpace) DeriveObjectIdWithAccountSignature(ctx context.Context, uniqueKey domain.UniqueKey) (string, error) {
	ret := _m.Called(ctx, uniqueKey)

	if len(ret) == 0 {
		panic("no return value specified for DeriveObjectIdWithAccountSignature")
	}

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, domain.UniqueKey) (string, error)); ok {
		return rf(ctx, uniqueKey)
	}
	if rf, ok := ret.Get(0).(func(context.Context, domain.UniqueKey) string); ok {
		r0 = rf(ctx, uniqueKey)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context, domain.UniqueKey) error); ok {
		r1 = rf(ctx, uniqueKey)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_DeriveObjectIdWithAccountSignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveObjectIdWithAccountSignature'
type MockSpace_DeriveObjectIdWithAccountSignature_Call struct {
	*mock.Call
}

// DeriveObjectIdWithAccountSignature is a helper method to define mock.On call
//   - ctx context.Context
//   - uniqueKey domain.UniqueKey
func (_e *MockSpace_Expecter) DeriveObjectIdWithAccountSignature(ctx interface{}, uniqueKey interface{}) *MockSpace_DeriveObjectIdWithAccountSignature_Call {
	return &MockSpace_DeriveObjectIdWithAccountSignature_Call{Call: _e.mock.On("DeriveObjectIdWithAccountSignature", ctx, uniqueKey)}
}

func (_c *MockSpace_DeriveObjectIdWithAccountSignature_Call) Run(run func(ctx context.Context, uniqueKey domain.UniqueKey)) *MockSpace_DeriveObjectIdWithAccountSignature_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.UniqueKey))
	})
	return _c
}

func (_c *MockSpace_DeriveObjectIdWithAccountSignature_Call) Return(id string, err error) *MockSpace_DeriveObjectIdWithAccountSignature_Call {
	_c.Call.Return(id, err)
	return _c
}

func (_c *MockSpace_DeriveObjectIdWithAccountSignature_Call) RunAndReturn(run func(context.Context, domain.UniqueKey) (string, error)) *MockSpace_DeriveObjectIdWithAccountSignature_Call {
	_c.Call.Return(run)
	return _c
}

// DeriveTreeObject provides a mock function with given fields: ctx, params
func (_m *MockSpace) DeriveTreeObject(ctx context.Context, params objectcache.TreeDerivationParams) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, params)

	if len(ret) == 0 {
		panic("no return value specified for DeriveTreeObject")
	}

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, objectcache.TreeDerivationParams) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, params)
	}
	if rf, ok := ret.Get(0).(func(context.Context, objectcache.TreeDerivationParams) smartblock.SmartBlock); ok {
		r0 = rf(ctx, params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, objectcache.TreeDerivationParams) error); ok {
		r1 = rf(ctx, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_DeriveTreeObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveTreeObject'
type MockSpace_DeriveTreeObject_Call struct {
	*mock.Call
}

// DeriveTreeObject is a helper method to define mock.On call
//   - ctx context.Context
//   - params objectcache.TreeDerivationParams
func (_e *MockSpace_Expecter) DeriveTreeObject(ctx interface{}, params interface{}) *MockSpace_DeriveTreeObject_Call {
	return &MockSpace_DeriveTreeObject_Call{Call: _e.mock.On("DeriveTreeObject", ctx, params)}
}

func (_c *MockSpace_DeriveTreeObject_Call) Run(run func(ctx context.Context, params objectcache.TreeDerivationParams)) *MockSpace_DeriveTreeObject_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(objectcache.TreeDerivationParams))
	})
	return _c
}

func (_c *MockSpace_DeriveTreeObject_Call) Return(sb smartblock.SmartBlock, err error) *MockSpace_DeriveTreeObject_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockSpace_DeriveTreeObject_Call) RunAndReturn(run func(context.Context, objectcache.TreeDerivationParams) (smartblock.SmartBlock, error)) *MockSpace_DeriveTreeObject_Call {
	_c.Call.Return(run)
	return _c
}

// DeriveTreeObjectWithAccountSignature provides a mock function with given fields: ctx, params
func (_m *MockSpace) DeriveTreeObjectWithAccountSignature(ctx context.Context, params objectcache.TreeDerivationParams) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, params)

	if len(ret) == 0 {
		panic("no return value specified for DeriveTreeObjectWithAccountSignature")
	}

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, objectcache.TreeDerivationParams) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, params)
	}
	if rf, ok := ret.Get(0).(func(context.Context, objectcache.TreeDerivationParams) smartblock.SmartBlock); ok {
		r0 = rf(ctx, params)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, objectcache.TreeDerivationParams) error); ok {
		r1 = rf(ctx, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_DeriveTreeObjectWithAccountSignature_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveTreeObjectWithAccountSignature'
type MockSpace_DeriveTreeObjectWithAccountSignature_Call struct {
	*mock.Call
}

// DeriveTreeObjectWithAccountSignature is a helper method to define mock.On call
//   - ctx context.Context
//   - params objectcache.TreeDerivationParams
func (_e *MockSpace_Expecter) DeriveTreeObjectWithAccountSignature(ctx interface{}, params interface{}) *MockSpace_DeriveTreeObjectWithAccountSignature_Call {
	return &MockSpace_DeriveTreeObjectWithAccountSignature_Call{Call: _e.mock.On("DeriveTreeObjectWithAccountSignature", ctx, params)}
}

func (_c *MockSpace_DeriveTreeObjectWithAccountSignature_Call) Run(run func(ctx context.Context, params objectcache.TreeDerivationParams)) *MockSpace_DeriveTreeObjectWithAccountSignature_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(objectcache.TreeDerivationParams))
	})
	return _c
}

func (_c *MockSpace_DeriveTreeObjectWithAccountSignature_Call) Return(sb smartblock.SmartBlock, err error) *MockSpace_DeriveTreeObjectWithAccountSignature_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockSpace_DeriveTreeObjectWithAccountSignature_Call) RunAndReturn(run func(context.Context, objectcache.TreeDerivationParams) (smartblock.SmartBlock, error)) *MockSpace_DeriveTreeObjectWithAccountSignature_Call {
	_c.Call.Return(run)
	return _c
}

// DeriveTreePayload provides a mock function with given fields: ctx, params
func (_m *MockSpace) DeriveTreePayload(ctx context.Context, params payloadcreator.PayloadDerivationParams) (treestorage.TreeStorageCreatePayload, error) {
	ret := _m.Called(ctx, params)

	if len(ret) == 0 {
		panic("no return value specified for DeriveTreePayload")
	}

	var r0 treestorage.TreeStorageCreatePayload
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, payloadcreator.PayloadDerivationParams) (treestorage.TreeStorageCreatePayload, error)); ok {
		return rf(ctx, params)
	}
	if rf, ok := ret.Get(0).(func(context.Context, payloadcreator.PayloadDerivationParams) treestorage.TreeStorageCreatePayload); ok {
		r0 = rf(ctx, params)
	} else {
		r0 = ret.Get(0).(treestorage.TreeStorageCreatePayload)
	}

	if rf, ok := ret.Get(1).(func(context.Context, payloadcreator.PayloadDerivationParams) error); ok {
		r1 = rf(ctx, params)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_DeriveTreePayload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeriveTreePayload'
type MockSpace_DeriveTreePayload_Call struct {
	*mock.Call
}

// DeriveTreePayload is a helper method to define mock.On call
//   - ctx context.Context
//   - params payloadcreator.PayloadDerivationParams
func (_e *MockSpace_Expecter) DeriveTreePayload(ctx interface{}, params interface{}) *MockSpace_DeriveTreePayload_Call {
	return &MockSpace_DeriveTreePayload_Call{Call: _e.mock.On("DeriveTreePayload", ctx, params)}
}

func (_c *MockSpace_DeriveTreePayload_Call) Run(run func(ctx context.Context, params payloadcreator.PayloadDerivationParams)) *MockSpace_DeriveTreePayload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(payloadcreator.PayloadDerivationParams))
	})
	return _c
}

func (_c *MockSpace_DeriveTreePayload_Call) Return(storagePayload treestorage.TreeStorageCreatePayload, err error) *MockSpace_DeriveTreePayload_Call {
	_c.Call.Return(storagePayload, err)
	return _c
}

func (_c *MockSpace_DeriveTreePayload_Call) RunAndReturn(run func(context.Context, payloadcreator.PayloadDerivationParams) (treestorage.TreeStorageCreatePayload, error)) *MockSpace_DeriveTreePayload_Call {
	_c.Call.Return(run)
	return _c
}

// DerivedIDs provides a mock function with given fields:
func (_m *MockSpace) DerivedIDs() threads.DerivedSmartblockIds {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for DerivedIDs")
	}

	var r0 threads.DerivedSmartblockIds
	if rf, ok := ret.Get(0).(func() threads.DerivedSmartblockIds); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(threads.DerivedSmartblockIds)
	}

	return r0
}

// MockSpace_DerivedIDs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DerivedIDs'
type MockSpace_DerivedIDs_Call struct {
	*mock.Call
}

// DerivedIDs is a helper method to define mock.On call
func (_e *MockSpace_Expecter) DerivedIDs() *MockSpace_DerivedIDs_Call {
	return &MockSpace_DerivedIDs_Call{Call: _e.mock.On("DerivedIDs")}
}

func (_c *MockSpace_DerivedIDs_Call) Run(run func()) *MockSpace_DerivedIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_DerivedIDs_Call) Return(_a0 threads.DerivedSmartblockIds) *MockSpace_DerivedIDs_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_DerivedIDs_Call) RunAndReturn(run func() threads.DerivedSmartblockIds) *MockSpace_DerivedIDs_Call {
	_c.Call.Return(run)
	return _c
}

// Do provides a mock function with given fields: objectId, apply
func (_m *MockSpace) Do(objectId string, apply func(smartblock.SmartBlock) error) error {
	ret := _m.Called(objectId, apply)

	if len(ret) == 0 {
		panic("no return value specified for Do")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(string, func(smartblock.SmartBlock) error) error); ok {
		r0 = rf(objectId, apply)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
type MockSpace_Do_Call struct {
	*mock.Call
}

// Do is a helper method to define mock.On call
//   - objectId string
//   - apply func(smartblock.SmartBlock) error
func (_e *MockSpace_Expecter) Do(objectId interface{}, apply interface{}) *MockSpace_Do_Call {
	return &MockSpace_Do_Call{Call: _e.mock.On("Do", objectId, apply)}
}

func (_c *MockSpace_Do_Call) Run(run func(objectId string, apply func(smartblock.SmartBlock) error)) *MockSpace_Do_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(func(smartblock.SmartBlock) error))
	})
	return _c
}

func (_c *MockSpace_Do_Call) Return(_a0 error) *MockSpace_Do_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_Do_Call) RunAndReturn(run func(string, func(smartblock.SmartBlock) error) error) *MockSpace_Do_Call {
	_c.Call.Return(run)
	return _c
}

// DoCtx provides a mock function with given fields: ctx, objectId, apply
func (_m *MockSpace) DoCtx(ctx context.Context, objectId string, apply func(smartblock.SmartBlock) error) error {
	ret := _m.Called(ctx, objectId, apply)

	if len(ret) == 0 {
		panic("no return value specified for DoCtx")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, func(smartblock.SmartBlock) error) error); ok {
		r0 = rf(ctx, objectId, apply)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_DoCtx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoCtx'
type MockSpace_DoCtx_Call struct {
	*mock.Call
}

// DoCtx is a helper method to define mock.On call
//   - ctx context.Context
//   - objectId string
//   - apply func(smartblock.SmartBlock) error
func (_e *MockSpace_Expecter) DoCtx(ctx interface{}, objectId interface{}, apply interface{}) *MockSpace_DoCtx_Call {
	return &MockSpace_DoCtx_Call{Call: _e.mock.On("DoCtx", ctx, objectId, apply)}
}

func (_c *MockSpace_DoCtx_Call) Run(run func(ctx context.Context, objectId string, apply func(smartblock.SmartBlock) error)) *MockSpace_DoCtx_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(func(smartblock.SmartBlock) error))
	})
	return _c
}

func (_c *MockSpace_DoCtx_Call) Return(_a0 error) *MockSpace_DoCtx_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_DoCtx_Call) RunAndReturn(run func(context.Context, string, func(smartblock.SmartBlock) error) error) *MockSpace_DoCtx_Call {
	_c.Call.Return(run)
	return _c
}

// DoLockedIfNotExists provides a mock function with given fields: objectID, proc
func (_m *MockSpace) DoLockedIfNotExists(objectID string, proc func() error) error {
	ret := _m.Called(objectID, proc)

	if len(ret) == 0 {
		panic("no return value specified for DoLockedIfNotExists")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(string, func() error) error); ok {
		r0 = rf(objectID, proc)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_DoLockedIfNotExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoLockedIfNotExists'
type MockSpace_DoLockedIfNotExists_Call struct {
	*mock.Call
}

// DoLockedIfNotExists is a helper method to define mock.On call
//   - objectID string
//   - proc func() error
func (_e *MockSpace_Expecter) DoLockedIfNotExists(objectID interface{}, proc interface{}) *MockSpace_DoLockedIfNotExists_Call {
	return &MockSpace_DoLockedIfNotExists_Call{Call: _e.mock.On("DoLockedIfNotExists", objectID, proc)}
}

func (_c *MockSpace_DoLockedIfNotExists_Call) Run(run func(objectID string, proc func() error)) *MockSpace_DoLockedIfNotExists_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(func() error))
	})
	return _c
}

func (_c *MockSpace_DoLockedIfNotExists_Call) Return(_a0 error) *MockSpace_DoLockedIfNotExists_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_DoLockedIfNotExists_Call) RunAndReturn(run func(string, func() error) error) *MockSpace_DoLockedIfNotExists_Call {
	_c.Call.Return(run)
	return _c
}

// GetAclIdentity provides a mock function with given fields:
func (_m *MockSpace) GetAclIdentity() crypto.PubKey {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for GetAclIdentity")
	}

	var r0 crypto.PubKey
	if rf, ok := ret.Get(0).(func() crypto.PubKey); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(crypto.PubKey)
		}
	}

	return r0
}

// MockSpace_GetAclIdentity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAclIdentity'
type MockSpace_GetAclIdentity_Call struct {
	*mock.Call
}

// GetAclIdentity is a helper method to define mock.On call
func (_e *MockSpace_Expecter) GetAclIdentity() *MockSpace_GetAclIdentity_Call {
	return &MockSpace_GetAclIdentity_Call{Call: _e.mock.On("GetAclIdentity")}
}

func (_c *MockSpace_GetAclIdentity_Call) Run(run func()) *MockSpace_GetAclIdentity_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_GetAclIdentity_Call) Return(_a0 crypto.PubKey) *MockSpace_GetAclIdentity_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_GetAclIdentity_Call) RunAndReturn(run func() crypto.PubKey) *MockSpace_GetAclIdentity_Call {
	_c.Call.Return(run)
	return _c
}

// GetObject provides a mock function with given fields: ctx, id
func (_m *MockSpace) GetObject(ctx context.Context, id string) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, id)

	if len(ret) == 0 {
		panic("no return value specified for GetObject")
	}

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) smartblock.SmartBlock); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_GetObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObject'
type MockSpace_GetObject_Call struct {
	*mock.Call
}

// GetObject is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *MockSpace_Expecter) GetObject(ctx interface{}, id interface{}) *MockSpace_GetObject_Call {
	return &MockSpace_GetObject_Call{Call: _e.mock.On("GetObject", ctx, id)}
}

func (_c *MockSpace_GetObject_Call) Run(run func(ctx context.Context, id string)) *MockSpace_GetObject_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockSpace_GetObject_Call) Return(sb smartblock.SmartBlock, err error) *MockSpace_GetObject_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockSpace_GetObject_Call) RunAndReturn(run func(context.Context, string) (smartblock.SmartBlock, error)) *MockSpace_GetObject_Call {
	_c.Call.Return(run)
	return _c
}

// GetObjectWithTimeout provides a mock function with given fields: ctx, id
func (_m *MockSpace) GetObjectWithTimeout(ctx context.Context, id string) (smartblock.SmartBlock, error) {
	ret := _m.Called(ctx, id)

	if len(ret) == 0 {
		panic("no return value specified for GetObjectWithTimeout")
	}

	var r0 smartblock.SmartBlock
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (smartblock.SmartBlock, error)); ok {
		return rf(ctx, id)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) smartblock.SmartBlock); ok {
		r0 = rf(ctx, id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(smartblock.SmartBlock)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_GetObjectWithTimeout_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetObjectWithTimeout'
type MockSpace_GetObjectWithTimeout_Call struct {
	*mock.Call
}

// GetObjectWithTimeout is a helper method to define mock.On call
//   - ctx context.Context
//   - id string
func (_e *MockSpace_Expecter) GetObjectWithTimeout(ctx interface{}, id interface{}) *MockSpace_GetObjectWithTimeout_Call {
	return &MockSpace_GetObjectWithTimeout_Call{Call: _e.mock.On("GetObjectWithTimeout", ctx, id)}
}

func (_c *MockSpace_GetObjectWithTimeout_Call) Run(run func(ctx context.Context, id string)) *MockSpace_GetObjectWithTimeout_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockSpace_GetObjectWithTimeout_Call) Return(sb smartblock.SmartBlock, err error) *MockSpace_GetObjectWithTimeout_Call {
	_c.Call.Return(sb, err)
	return _c
}

func (_c *MockSpace_GetObjectWithTimeout_Call) RunAndReturn(run func(context.Context, string) (smartblock.SmartBlock, error)) *MockSpace_GetObjectWithTimeout_Call {
	_c.Call.Return(run)
	return _c
}

// GetRelationIdByKey provides a mock function with given fields: ctx, key
func (_m *MockSpace) GetRelationIdByKey(ctx context.Context, key domain.RelationKey) (string, error) {
	ret := _m.Called(ctx, key)

	if len(ret) == 0 {
		panic("no return value specified for GetRelationIdByKey")
	}

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, domain.RelationKey) (string, error)); ok {
		return rf(ctx, key)
	}
	if rf, ok := ret.Get(0).(func(context.Context, domain.RelationKey) string); ok {
		r0 = rf(ctx, key)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context, domain.RelationKey) error); ok {
		r1 = rf(ctx, key)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_GetRelationIdByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRelationIdByKey'
type MockSpace_GetRelationIdByKey_Call struct {
	*mock.Call
}

// GetRelationIdByKey is a helper method to define mock.On call
//   - ctx context.Context
//   - key domain.RelationKey
func (_e *MockSpace_Expecter) GetRelationIdByKey(ctx interface{}, key interface{}) *MockSpace_GetRelationIdByKey_Call {
	return &MockSpace_GetRelationIdByKey_Call{Call: _e.mock.On("GetRelationIdByKey", ctx, key)}
}

func (_c *MockSpace_GetRelationIdByKey_Call) Run(run func(ctx context.Context, key domain.RelationKey)) *MockSpace_GetRelationIdByKey_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.RelationKey))
	})
	return _c
}

func (_c *MockSpace_GetRelationIdByKey_Call) Return(id string, err error) *MockSpace_GetRelationIdByKey_Call {
	_c.Call.Return(id, err)
	return _c
}

func (_c *MockSpace_GetRelationIdByKey_Call) RunAndReturn(run func(context.Context, domain.RelationKey) (string, error)) *MockSpace_GetRelationIdByKey_Call {
	_c.Call.Return(run)
	return _c
}

// GetTypeIdByKey provides a mock function with given fields: ctx, key
func (_m *MockSpace) GetTypeIdByKey(ctx context.Context, key domain.TypeKey) (string, error) {
	ret := _m.Called(ctx, key)

	if len(ret) == 0 {
		panic("no return value specified for GetTypeIdByKey")
	}

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, domain.TypeKey) (string, error)); ok {
		return rf(ctx, key)
	}
	if rf, ok := ret.Get(0).(func(context.Context, domain.TypeKey) string); ok {
		r0 = rf(ctx, key)
	} else {
		r0 = ret.Get(0).(string)
	}

	if rf, ok := ret.Get(1).(func(context.Context, domain.TypeKey) error); ok {
		r1 = rf(ctx, key)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_GetTypeIdByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetTypeIdByKey'
type MockSpace_GetTypeIdByKey_Call struct {
	*mock.Call
}

// GetTypeIdByKey is a helper method to define mock.On call
//   - ctx context.Context
//   - key domain.TypeKey
func (_e *MockSpace_Expecter) GetTypeIdByKey(ctx interface{}, key interface{}) *MockSpace_GetTypeIdByKey_Call {
	return &MockSpace_GetTypeIdByKey_Call{Call: _e.mock.On("GetTypeIdByKey", ctx, key)}
}

func (_c *MockSpace_GetTypeIdByKey_Call) Run(run func(ctx context.Context, key domain.TypeKey)) *MockSpace_GetTypeIdByKey_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.TypeKey))
	})
	return _c
}

func (_c *MockSpace_GetTypeIdByKey_Call) Return(id string, err error) *MockSpace_GetTypeIdByKey_Call {
	_c.Call.Return(id, err)
	return _c
}

func (_c *MockSpace_GetTypeIdByKey_Call) RunAndReturn(run func(context.Context, domain.TypeKey) (string, error)) *MockSpace_GetTypeIdByKey_Call {
	_c.Call.Return(run)
	return _c
}

// Id provides a mock function with given fields:
func (_m *MockSpace) Id() string {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for Id")
	}

	var r0 string
	if rf, ok := ret.Get(0).(func() string); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(string)
	}

	return r0
}

// MockSpace_Id_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Id'
type MockSpace_Id_Call struct {
	*mock.Call
}

// Id is a helper method to define mock.On call
func (_e *MockSpace_Expecter) Id() *MockSpace_Id_Call {
	return &MockSpace_Id_Call{Call: _e.mock.On("Id")}
}

func (_c *MockSpace_Id_Call) Run(run func()) *MockSpace_Id_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_Id_Call) Return(_a0 string) *MockSpace_Id_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_Id_Call) RunAndReturn(run func() string) *MockSpace_Id_Call {
	_c.Call.Return(run)
	return _c
}

// IsPersonal provides a mock function with given fields:
func (_m *MockSpace) IsPersonal() bool {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for IsPersonal")
	}

	var r0 bool
	if rf, ok := ret.Get(0).(func() bool); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

// MockSpace_IsPersonal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsPersonal'
type MockSpace_IsPersonal_Call struct {
	*mock.Call
}

// IsPersonal is a helper method to define mock.On call
func (_e *MockSpace_Expecter) IsPersonal() *MockSpace_IsPersonal_Call {
	return &MockSpace_IsPersonal_Call{Call: _e.mock.On("IsPersonal")}
}

func (_c *MockSpace_IsPersonal_Call) Run(run func()) *MockSpace_IsPersonal_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_IsPersonal_Call) Return(_a0 bool) *MockSpace_IsPersonal_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_IsPersonal_Call) RunAndReturn(run func() bool) *MockSpace_IsPersonal_Call {
	_c.Call.Return(run)
	return _c
}

// IsReadOnly provides a mock function with given fields:
func (_m *MockSpace) IsReadOnly() bool {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for IsReadOnly")
	}

	var r0 bool
	if rf, ok := ret.Get(0).(func() bool); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(bool)
	}

	return r0
}

// MockSpace_IsReadOnly_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsReadOnly'
type MockSpace_IsReadOnly_Call struct {
	*mock.Call
}

// IsReadOnly is a helper method to define mock.On call
func (_e *MockSpace_Expecter) IsReadOnly() *MockSpace_IsReadOnly_Call {
	return &MockSpace_IsReadOnly_Call{Call: _e.mock.On("IsReadOnly")}
}

func (_c *MockSpace_IsReadOnly_Call) Run(run func()) *MockSpace_IsReadOnly_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_IsReadOnly_Call) Return(_a0 bool) *MockSpace_IsReadOnly_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_IsReadOnly_Call) RunAndReturn(run func() bool) *MockSpace_IsReadOnly_Call {
	_c.Call.Return(run)
	return _c
}

// KeyValueService provides a mock function with given fields:
func (_m *MockSpace) KeyValueService() keyvalueservice.Service {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for KeyValueService")
	}

	var r0 keyvalueservice.Service
	if rf, ok := ret.Get(0).(func() keyvalueservice.Service); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(keyvalueservice.Service)
		}
	}

	return r0
}

// MockSpace_KeyValueService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'KeyValueService'
type MockSpace_KeyValueService_Call struct {
	*mock.Call
}

// KeyValueService is a helper method to define mock.On call
func (_e *MockSpace_Expecter) KeyValueService() *MockSpace_KeyValueService_Call {
	return &MockSpace_KeyValueService_Call{Call: _e.mock.On("KeyValueService")}
}

func (_c *MockSpace_KeyValueService_Call) Run(run func()) *MockSpace_KeyValueService_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_KeyValueService_Call) Return(_a0 keyvalueservice.Service) *MockSpace_KeyValueService_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_KeyValueService_Call) RunAndReturn(run func() keyvalueservice.Service) *MockSpace_KeyValueService_Call {
	_c.Call.Return(run)
	return _c
}

// LoadObjects provides a mock function with given fields: ctx, ids
func (_m *MockSpace) LoadObjects(ctx context.Context, ids []string) error {
	ret := _m.Called(ctx, ids)

	if len(ret) == 0 {
		panic("no return value specified for LoadObjects")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, []string) error); ok {
		r0 = rf(ctx, ids)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_LoadObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadObjects'
type MockSpace_LoadObjects_Call struct {
	*mock.Call
}

// LoadObjects is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []string
func (_e *MockSpace_Expecter) LoadObjects(ctx interface{}, ids interface{}) *MockSpace_LoadObjects_Call {
	return &MockSpace_LoadObjects_Call{Call: _e.mock.On("LoadObjects", ctx, ids)}
}

func (_c *MockSpace_LoadObjects_Call) Run(run func(ctx context.Context, ids []string)) *MockSpace_LoadObjects_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].([]string))
	})
	return _c
}

func (_c *MockSpace_LoadObjects_Call) Return(err error) *MockSpace_LoadObjects_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockSpace_LoadObjects_Call) RunAndReturn(run func(context.Context, []string) error) *MockSpace_LoadObjects_Call {
	_c.Call.Return(run)
	return _c
}

// LoadObjectsIgnoreErrs provides a mock function with given fields: ctx, objIDs
func (_m *MockSpace) LoadObjectsIgnoreErrs(ctx context.Context, objIDs []string) {
	_m.Called(ctx, objIDs)
}

// MockSpace_LoadObjectsIgnoreErrs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadObjectsIgnoreErrs'
type MockSpace_LoadObjectsIgnoreErrs_Call struct {
	*mock.Call
}

// LoadObjectsIgnoreErrs is a helper method to define mock.On call
//   - ctx context.Context
//   - objIDs []string
func (_e *MockSpace_Expecter) LoadObjectsIgnoreErrs(ctx interface{}, objIDs interface{}) *MockSpace_LoadObjectsIgnoreErrs_Call {
	return &MockSpace_LoadObjectsIgnoreErrs_Call{Call: _e.mock.On("LoadObjectsIgnoreErrs", ctx, objIDs)}
}

func (_c *MockSpace_LoadObjectsIgnoreErrs_Call) Run(run func(ctx context.Context, objIDs []string)) *MockSpace_LoadObjectsIgnoreErrs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].([]string))
	})
	return _c
}

func (_c *MockSpace_LoadObjectsIgnoreErrs_Call) Return() *MockSpace_LoadObjectsIgnoreErrs_Call {
	_c.Call.Return()
	return _c
}

func (_c *MockSpace_LoadObjectsIgnoreErrs_Call) RunAndReturn(run func(context.Context, []string)) *MockSpace_LoadObjectsIgnoreErrs_Call {
	_c.Call.Return(run)
	return _c
}

// RefreshObjects provides a mock function with given fields: objectIds
func (_m *MockSpace) RefreshObjects(objectIds []string) error {
	ret := _m.Called(objectIds)

	if len(ret) == 0 {
		panic("no return value specified for RefreshObjects")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func([]string) error); ok {
		r0 = rf(objectIds)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_RefreshObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RefreshObjects'
type MockSpace_RefreshObjects_Call struct {
	*mock.Call
}

// RefreshObjects is a helper method to define mock.On call
//   - objectIds []string
func (_e *MockSpace_Expecter) RefreshObjects(objectIds interface{}) *MockSpace_RefreshObjects_Call {
	return &MockSpace_RefreshObjects_Call{Call: _e.mock.On("RefreshObjects", objectIds)}
}

func (_c *MockSpace_RefreshObjects_Call) Run(run func(objectIds []string)) *MockSpace_RefreshObjects_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].([]string))
	})
	return _c
}

func (_c *MockSpace_RefreshObjects_Call) Return(err error) *MockSpace_RefreshObjects_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockSpace_RefreshObjects_Call) RunAndReturn(run func([]string) error) *MockSpace_RefreshObjects_Call {
	_c.Call.Return(run)
	return _c
}

// Remove provides a mock function with given fields: ctx, objectID
func (_m *MockSpace) Remove(ctx context.Context, objectID string) error {
	ret := _m.Called(ctx, objectID)

	if len(ret) == 0 {
		panic("no return value specified for Remove")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = rf(ctx, objectID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
type MockSpace_Remove_Call struct {
	*mock.Call
}

// Remove is a helper method to define mock.On call
//   - ctx context.Context
//   - objectID string
func (_e *MockSpace_Expecter) Remove(ctx interface{}, objectID interface{}) *MockSpace_Remove_Call {
	return &MockSpace_Remove_Call{Call: _e.mock.On("Remove", ctx, objectID)}
}

func (_c *MockSpace_Remove_Call) Run(run func(ctx context.Context, objectID string)) *MockSpace_Remove_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *MockSpace_Remove_Call) Return(_a0 error) *MockSpace_Remove_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_Remove_Call) RunAndReturn(run func(context.Context, string) error) *MockSpace_Remove_Call {
	_c.Call.Return(run)
	return _c
}

// Storage provides a mock function with given fields:
func (_m *MockSpace) Storage() anystorage.ClientSpaceStorage {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for Storage")
	}

	var r0 anystorage.ClientSpaceStorage
	if rf, ok := ret.Get(0).(func() anystorage.ClientSpaceStorage); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(anystorage.ClientSpaceStorage)
		}
	}

	return r0
}

// MockSpace_Storage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Storage'
type MockSpace_Storage_Call struct {
	*mock.Call
}

// Storage is a helper method to define mock.On call
func (_e *MockSpace_Expecter) Storage() *MockSpace_Storage_Call {
	return &MockSpace_Storage_Call{Call: _e.mock.On("Storage")}
}

func (_c *MockSpace_Storage_Call) Run(run func()) *MockSpace_Storage_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_Storage_Call) Return(_a0 anystorage.ClientSpaceStorage) *MockSpace_Storage_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_Storage_Call) RunAndReturn(run func() anystorage.ClientSpaceStorage) *MockSpace_Storage_Call {
	_c.Call.Return(run)
	return _c
}

// StoredIds provides a mock function with given fields:
func (_m *MockSpace) StoredIds() []string {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for StoredIds")
	}

	var r0 []string
	if rf, ok := ret.Get(0).(func() []string); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	return r0
}

// MockSpace_StoredIds_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StoredIds'
type MockSpace_StoredIds_Call struct {
	*mock.Call
}

// StoredIds is a helper method to define mock.On call
func (_e *MockSpace_Expecter) StoredIds() *MockSpace_StoredIds_Call {
	return &MockSpace_StoredIds_Call{Call: _e.mock.On("StoredIds")}
}

func (_c *MockSpace_StoredIds_Call) Run(run func()) *MockSpace_StoredIds_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_StoredIds_Call) Return(_a0 []string) *MockSpace_StoredIds_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_StoredIds_Call) RunAndReturn(run func() []string) *MockSpace_StoredIds_Call {
	_c.Call.Return(run)
	return _c
}

// TreeBuilder provides a mock function with given fields:
func (_m *MockSpace) TreeBuilder() objecttreebuilder.TreeBuilder {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for TreeBuilder")
	}

	var r0 objecttreebuilder.TreeBuilder
	if rf, ok := ret.Get(0).(func() objecttreebuilder.TreeBuilder); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(objecttreebuilder.TreeBuilder)
		}
	}

	return r0
}

// MockSpace_TreeBuilder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TreeBuilder'
type MockSpace_TreeBuilder_Call struct {
	*mock.Call
}

// TreeBuilder is a helper method to define mock.On call
func (_e *MockSpace_Expecter) TreeBuilder() *MockSpace_TreeBuilder_Call {
	return &MockSpace_TreeBuilder_Call{Call: _e.mock.On("TreeBuilder")}
}

func (_c *MockSpace_TreeBuilder_Call) Run(run func()) *MockSpace_TreeBuilder_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *MockSpace_TreeBuilder_Call) Return(_a0 objecttreebuilder.TreeBuilder) *MockSpace_TreeBuilder_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockSpace_TreeBuilder_Call) RunAndReturn(run func() objecttreebuilder.TreeBuilder) *MockSpace_TreeBuilder_Call {
	_c.Call.Return(run)
	return _c
}

// TryRemove provides a mock function with given fields: objectId
func (_m *MockSpace) TryRemove(objectId string) (bool, error) {
	ret := _m.Called(objectId)

	if len(ret) == 0 {
		panic("no return value specified for TryRemove")
	}

	var r0 bool
	var r1 error
	if rf, ok := ret.Get(0).(func(string) (bool, error)); ok {
		return rf(objectId)
	}
	if rf, ok := ret.Get(0).(func(string) bool); ok {
		r0 = rf(objectId)
	} else {
		r0 = ret.Get(0).(bool)
	}

	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(objectId)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// MockSpace_TryRemove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TryRemove'
type MockSpace_TryRemove_Call struct {
	*mock.Call
}

// TryRemove is a helper method to define mock.On call
//   - objectId string
func (_e *MockSpace_Expecter) TryRemove(objectId interface{}) *MockSpace_TryRemove_Call {
	return &MockSpace_TryRemove_Call{Call: _e.mock.On("TryRemove", objectId)}
}

func (_c *MockSpace_TryRemove_Call) Run(run func(objectId string)) *MockSpace_TryRemove_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *MockSpace_TryRemove_Call) Return(_a0 bool, _a1 error) *MockSpace_TryRemove_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockSpace_TryRemove_Call) RunAndReturn(run func(string) (bool, error)) *MockSpace_TryRemove_Call {
	_c.Call.Return(run)
	return _c
}

// WaitMandatoryObjects provides a mock function with given fields: ctx
func (_m *MockSpace) WaitMandatoryObjects(ctx context.Context) error {
	ret := _m.Called(ctx)

	if len(ret) == 0 {
		panic("no return value specified for WaitMandatoryObjects")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context) error); ok {
		r0 = rf(ctx)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// MockSpace_WaitMandatoryObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitMandatoryObjects'
type MockSpace_WaitMandatoryObjects_Call struct {
	*mock.Call
}

// WaitMandatoryObjects is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockSpace_Expecter) WaitMandatoryObjects(ctx interface{}) *MockSpace_WaitMandatoryObjects_Call {
	return &MockSpace_WaitMandatoryObjects_Call{Call: _e.mock.On("WaitMandatoryObjects", ctx)}
}

func (_c *MockSpace_WaitMandatoryObjects_Call) Run(run func(ctx context.Context)) *MockSpace_WaitMandatoryObjects_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *MockSpace_WaitMandatoryObjects_Call) Return(err error) *MockSpace_WaitMandatoryObjects_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockSpace_WaitMandatoryObjects_Call) RunAndReturn(run func(context.Context) error) *MockSpace_WaitMandatoryObjects_Call {
	_c.Call.Return(run)
	return _c
}

// NewMockSpace creates a new instance of MockSpace. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockSpace(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockSpace {
	mock := &MockSpace{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
