// Code generated by mockery. DO NOT EDIT.

package mock_anystorage

import (
	anystore "github.com/anyproto/any-store"
	app "github.com/anyproto/any-sync/app"

	context "context"

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

	list "github.com/anyproto/any-sync/commonspace/object/acl/list"

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

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

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

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

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

// MockClientSpaceStorage is an autogenerated mock type for the ClientSpaceStorage type
type MockClientSpaceStorage struct {
	mock.Mock
}

type MockClientSpaceStorage_Expecter struct {
	mock *mock.Mock
}

func (_m *MockClientSpaceStorage) EXPECT() *MockClientSpaceStorage_Expecter {
	return &MockClientSpaceStorage_Expecter{mock: &_m.Mock}
}

// AclStorage provides a mock function with given fields:
func (_m *MockClientSpaceStorage) AclStorage() (list.Storage, error) {
	ret := _m.Called()

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

	var r0 list.Storage
	var r1 error
	if rf, ok := ret.Get(0).(func() (list.Storage, error)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() list.Storage); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(list.Storage)
		}
	}

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

	return r0, r1
}

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

// AclStorage is a helper method to define mock.On call
func (_e *MockClientSpaceStorage_Expecter) AclStorage() *MockClientSpaceStorage_AclStorage_Call {
	return &MockClientSpaceStorage_AclStorage_Call{Call: _e.mock.On("AclStorage")}
}

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

func (_c *MockClientSpaceStorage_AclStorage_Call) Return(_a0 list.Storage, _a1 error) *MockClientSpaceStorage_AclStorage_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockClientSpaceStorage_AclStorage_Call) RunAndReturn(run func() (list.Storage, error)) *MockClientSpaceStorage_AclStorage_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockClientSpaceStorage_AllDeletedTreeIds_Call) Return(ids []string, err error) *MockClientSpaceStorage_AllDeletedTreeIds_Call {
	_c.Call.Return(ids, err)
	return _c
}

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

// AnyStore provides a mock function with given fields:
func (_m *MockClientSpaceStorage) AnyStore() anystore.DB {
	ret := _m.Called()

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

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

	return r0
}

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

// AnyStore is a helper method to define mock.On call
func (_e *MockClientSpaceStorage_Expecter) AnyStore() *MockClientSpaceStorage_AnyStore_Call {
	return &MockClientSpaceStorage_AnyStore_Call{Call: _e.mock.On("AnyStore")}
}

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

func (_c *MockClientSpaceStorage_AnyStore_Call) Return(_a0 anystore.DB) *MockClientSpaceStorage_AnyStore_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockClientSpaceStorage_AnyStore_Call) RunAndReturn(run func() anystore.DB) *MockClientSpaceStorage_AnyStore_Call {
	_c.Call.Return(run)
	return _c
}

// Close provides a mock function with given fields: ctx
func (_m *MockClientSpaceStorage) 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
}

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

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

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

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

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

// CreateStorageWithDeferredCreation provides a mock function with given fields: ctx, payload
func (_m *MockClientSpaceStorage) CreateStorageWithDeferredCreation(ctx context.Context, payload treestorage.TreeStorageCreatePayload) (objecttree.Storage, error) {
	ret := _m.Called(ctx, payload)

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

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

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

	return r0, r1
}

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

// CreateStorageWithDeferredCreation is a helper method to define mock.On call
//   - ctx context.Context
//   - payload treestorage.TreeStorageCreatePayload
func (_e *MockClientSpaceStorage_Expecter) CreateStorageWithDeferredCreation(ctx interface{}, payload interface{}) *MockClientSpaceStorage_CreateStorageWithDeferredCreation_Call {
	return &MockClientSpaceStorage_CreateStorageWithDeferredCreation_Call{Call: _e.mock.On("CreateStorageWithDeferredCreation", ctx, payload)}
}

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

func (_c *MockClientSpaceStorage_CreateStorageWithDeferredCreation_Call) Return(_a0 objecttree.Storage, _a1 error) *MockClientSpaceStorage_CreateStorageWithDeferredCreation_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockClientSpaceStorage_CreateStorageWithDeferredCreation_Call) RunAndReturn(run func(context.Context, treestorage.TreeStorageCreatePayload) (objecttree.Storage, error)) *MockClientSpaceStorage_CreateStorageWithDeferredCreation_Call {
	_c.Call.Return(run)
	return _c
}

// CreateTreeStorage provides a mock function with given fields: ctx, payload
func (_m *MockClientSpaceStorage) CreateTreeStorage(ctx context.Context, payload treestorage.TreeStorageCreatePayload) (objecttree.Storage, error) {
	ret := _m.Called(ctx, payload)

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

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

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

	return r0, r1
}

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

// CreateTreeStorage is a helper method to define mock.On call
//   - ctx context.Context
//   - payload treestorage.TreeStorageCreatePayload
func (_e *MockClientSpaceStorage_Expecter) CreateTreeStorage(ctx interface{}, payload interface{}) *MockClientSpaceStorage_CreateTreeStorage_Call {
	return &MockClientSpaceStorage_CreateTreeStorage_Call{Call: _e.mock.On("CreateTreeStorage", ctx, payload)}
}

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

func (_c *MockClientSpaceStorage_CreateTreeStorage_Call) Return(_a0 objecttree.Storage, _a1 error) *MockClientSpaceStorage_CreateTreeStorage_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockClientSpaceStorage_CreateTreeStorage_Call) RunAndReturn(run func(context.Context, treestorage.TreeStorageCreatePayload) (objecttree.Storage, error)) *MockClientSpaceStorage_CreateTreeStorage_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockClientSpaceStorage_HasTree_Call) Return(has bool, err error) *MockClientSpaceStorage_HasTree_Call {
	_c.Call.Return(has, err)
	return _c
}

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

// HeadStorage provides a mock function with given fields:
func (_m *MockClientSpaceStorage) HeadStorage() headstorage.HeadStorage {
	ret := _m.Called()

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

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

	return r0
}

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

// HeadStorage is a helper method to define mock.On call
func (_e *MockClientSpaceStorage_Expecter) HeadStorage() *MockClientSpaceStorage_HeadStorage_Call {
	return &MockClientSpaceStorage_HeadStorage_Call{Call: _e.mock.On("HeadStorage")}
}

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

func (_c *MockClientSpaceStorage_HeadStorage_Call) Return(_a0 headstorage.HeadStorage) *MockClientSpaceStorage_HeadStorage_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockClientSpaceStorage_HeadStorage_Call) RunAndReturn(run func() headstorage.HeadStorage) *MockClientSpaceStorage_HeadStorage_Call {
	_c.Call.Return(run)
	return _c
}

// Id provides a mock function with given fields:
func (_m *MockClientSpaceStorage) 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
}

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

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

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

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

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

// Init provides a mock function with given fields: a
func (_m *MockClientSpaceStorage) Init(a *app.App) error {
	ret := _m.Called(a)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*app.App) error); ok {
		r0 = rf(a)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Init is a helper method to define mock.On call
//   - a *app.App
func (_e *MockClientSpaceStorage_Expecter) Init(a interface{}) *MockClientSpaceStorage_Init_Call {
	return &MockClientSpaceStorage_Init_Call{Call: _e.mock.On("Init", a)}
}

func (_c *MockClientSpaceStorage_Init_Call) Run(run func(a *app.App)) *MockClientSpaceStorage_Init_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*app.App))
	})
	return _c
}

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

func (_c *MockClientSpaceStorage_Init_Call) RunAndReturn(run func(*app.App) error) *MockClientSpaceStorage_Init_Call {
	_c.Call.Return(run)
	return _c
}

// IsSpaceCreated provides a mock function with given fields: ctx
func (_m *MockClientSpaceStorage) IsSpaceCreated(ctx context.Context) (bool, error) {
	ret := _m.Called(ctx)

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockClientSpaceStorage_IsSpaceCreated_Call) Return(created bool, err error) *MockClientSpaceStorage_IsSpaceCreated_Call {
	_c.Call.Return(created, err)
	return _c
}

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

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

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

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

	return r0
}

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

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

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

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

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

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

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

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

	return r0
}

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

// Name is a helper method to define mock.On call
func (_e *MockClientSpaceStorage_Expecter) Name() *MockClientSpaceStorage_Name_Call {
	return &MockClientSpaceStorage_Name_Call{Call: _e.mock.On("Name")}
}

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

func (_c *MockClientSpaceStorage_Name_Call) Return(name string) *MockClientSpaceStorage_Name_Call {
	_c.Call.Return(name)
	return _c
}

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

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

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

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

	return r0
}

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

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

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

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

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

// StateStorage provides a mock function with given fields:
func (_m *MockClientSpaceStorage) StateStorage() statestorage.StateStorage {
	ret := _m.Called()

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

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

	return r0
}

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

// StateStorage is a helper method to define mock.On call
func (_e *MockClientSpaceStorage_Expecter) StateStorage() *MockClientSpaceStorage_StateStorage_Call {
	return &MockClientSpaceStorage_StateStorage_Call{Call: _e.mock.On("StateStorage")}
}

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

func (_c *MockClientSpaceStorage_StateStorage_Call) Return(_a0 statestorage.StateStorage) *MockClientSpaceStorage_StateStorage_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockClientSpaceStorage_StateStorage_Call) RunAndReturn(run func() statestorage.StateStorage) *MockClientSpaceStorage_StateStorage_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockClientSpaceStorage_TreeRoot_Call) Return(root *treechangeproto.RawTreeChangeWithId, err error) *MockClientSpaceStorage_TreeRoot_Call {
	_c.Call.Return(root, err)
	return _c
}

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

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

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockClientSpaceStorage_TreeStorage_Call) Return(_a0 objecttree.Storage, _a1 error) *MockClientSpaceStorage_TreeStorage_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

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

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

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

	return r0
}

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

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

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

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

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

// NewMockClientSpaceStorage creates a new instance of MockClientSpaceStorage. 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 NewMockClientSpaceStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClientSpaceStorage {
	mock := &MockClientSpaceStorage{}
	mock.Mock.Test(t)

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

	return mock
}
