// Code generated by mockery. DO NOT EDIT.

package mock_storage

import (
	context "context"

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

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

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

// MockClientStorage is an autogenerated mock type for the ClientStorage type
type MockClientStorage struct {
	mock.Mock
}

type MockClientStorage_Expecter struct {
	mock *mock.Mock
}

func (_m *MockClientStorage) EXPECT() *MockClientStorage_Expecter {
	return &MockClientStorage_Expecter{mock: &_m.Mock}
}

// AllSpaceIds provides a mock function with given fields:
func (_m *MockClientStorage) AllSpaceIds() ([]string, error) {
	ret := _m.Called()

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

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

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

	return r0, r1
}

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

// AllSpaceIds is a helper method to define mock.On call
func (_e *MockClientStorage_Expecter) AllSpaceIds() *MockClientStorage_AllSpaceIds_Call {
	return &MockClientStorage_AllSpaceIds_Call{Call: _e.mock.On("AllSpaceIds")}
}

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

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

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

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

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

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

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

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

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

// CreateSpaceStorage provides a mock function with given fields: ctx, payload
func (_m *MockClientStorage) CreateSpaceStorage(ctx context.Context, payload spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error) {
	ret := _m.Called(ctx, payload)

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

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

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

	return r0, r1
}

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

// CreateSpaceStorage is a helper method to define mock.On call
//   - ctx context.Context
//   - payload spacestorage.SpaceStorageCreatePayload
func (_e *MockClientStorage_Expecter) CreateSpaceStorage(ctx interface{}, payload interface{}) *MockClientStorage_CreateSpaceStorage_Call {
	return &MockClientStorage_CreateSpaceStorage_Call{Call: _e.mock.On("CreateSpaceStorage", ctx, payload)}
}

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

func (_c *MockClientStorage_CreateSpaceStorage_Call) Return(_a0 spacestorage.SpaceStorage, _a1 error) *MockClientStorage_CreateSpaceStorage_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockClientStorage_CreateSpaceStorage_Call) RunAndReturn(run func(context.Context, spacestorage.SpaceStorageCreatePayload) (spacestorage.SpaceStorage, error)) *MockClientStorage_CreateSpaceStorage_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

	return r0
}

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

// DeleteSpaceStorage is a helper method to define mock.On call
//   - ctx context.Context
//   - spaceId string
func (_e *MockClientStorage_Expecter) DeleteSpaceStorage(ctx interface{}, spaceId interface{}) *MockClientStorage_DeleteSpaceStorage_Call {
	return &MockClientStorage_DeleteSpaceStorage_Call{Call: _e.mock.On("DeleteSpaceStorage", ctx, spaceId)}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SpaceExists provides a mock function with given fields: id
func (_m *MockClientStorage) SpaceExists(id string) bool {
	ret := _m.Called(id)

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

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

	return r0
}

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

// SpaceExists is a helper method to define mock.On call
//   - id string
func (_e *MockClientStorage_Expecter) SpaceExists(id interface{}) *MockClientStorage_SpaceExists_Call {
	return &MockClientStorage_SpaceExists_Call{Call: _e.mock.On("SpaceExists", id)}
}

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

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

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

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

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

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

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

	return r0, r1
}

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

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

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

func (_c *MockClientStorage_WaitSpaceStorage_Call) Return(_a0 spacestorage.SpaceStorage, _a1 error) *MockClientStorage_WaitSpaceStorage_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

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

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

	return mock
}
