// Code generated by mockery. DO NOT EDIT.

package mock_files

import (
	context "context"

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

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

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

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

	storage "github.com/anyproto/anytype-heart/pkg/lib/pb/storage"

	symmetric "github.com/anyproto/anytype-heart/pkg/lib/crypto/symmetric"
)

// MockService is an autogenerated mock type for the Service type
type MockService struct {
	mock.Mock
}

type MockService_Expecter struct {
	mock *mock.Mock
}

func (_m *MockService) EXPECT() *MockService_Expecter {
	return &MockService_Expecter{mock: &_m.Mock}
}

// FileAdd provides a mock function with given fields: ctx, spaceID, options
func (_m *MockService) FileAdd(ctx context.Context, spaceID string, options ...files.AddOption) (*files.AddResult, error) {
	_va := make([]interface{}, len(options))
	for _i := range options {
		_va[_i] = options[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, spaceID)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 *files.AddResult
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, ...files.AddOption) (*files.AddResult, error)); ok {
		return rf(ctx, spaceID, options...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, ...files.AddOption) *files.AddResult); ok {
		r0 = rf(ctx, spaceID, options...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*files.AddResult)
		}
	}

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

	return r0, r1
}

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

// FileAdd is a helper method to define mock.On call
//   - ctx context.Context
//   - spaceID string
//   - options ...files.AddOption
func (_e *MockService_Expecter) FileAdd(ctx interface{}, spaceID interface{}, options ...interface{}) *MockService_FileAdd_Call {
	return &MockService_FileAdd_Call{Call: _e.mock.On("FileAdd",
		append([]interface{}{ctx, spaceID}, options...)...)}
}

func (_c *MockService_FileAdd_Call) Run(run func(ctx context.Context, spaceID string, options ...files.AddOption)) *MockService_FileAdd_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]files.AddOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(files.AddOption)
			}
		}
		run(args[0].(context.Context), args[1].(string), variadicArgs...)
	})
	return _c
}

func (_c *MockService_FileAdd_Call) Return(_a0 *files.AddResult, _a1 error) *MockService_FileAdd_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_FileAdd_Call) RunAndReturn(run func(context.Context, string, ...files.AddOption) (*files.AddResult, error)) *MockService_FileAdd_Call {
	_c.Call.Return(run)
	return _c
}

// GetContentReader provides a mock function with given fields: ctx, spaceID, rawCid, encKey
func (_m *MockService) GetContentReader(ctx context.Context, spaceID string, rawCid string, encKey string) (symmetric.ReadSeekCloser, error) {
	ret := _m.Called(ctx, spaceID, rawCid, encKey)

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

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

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

	return r0, r1
}

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

// GetContentReader is a helper method to define mock.On call
//   - ctx context.Context
//   - spaceID string
//   - rawCid string
//   - encKey string
func (_e *MockService_Expecter) GetContentReader(ctx interface{}, spaceID interface{}, rawCid interface{}, encKey interface{}) *MockService_GetContentReader_Call {
	return &MockService_GetContentReader_Call{Call: _e.mock.On("GetContentReader", ctx, spaceID, rawCid, encKey)}
}

func (_c *MockService_GetContentReader_Call) Run(run func(ctx context.Context, spaceID string, rawCid string, encKey string)) *MockService_GetContentReader_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string))
	})
	return _c
}

func (_c *MockService_GetContentReader_Call) Return(_a0 symmetric.ReadSeekCloser, _a1 error) *MockService_GetContentReader_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

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

// GetFileVariants provides a mock function with given fields: ctx, fileId, keys
func (_m *MockService) GetFileVariants(ctx context.Context, fileId domain.FullFileId, keys map[string]string) ([]*storage.FileInfo, error) {
	ret := _m.Called(ctx, fileId, keys)

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

	var r0 []*storage.FileInfo
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, domain.FullFileId, map[string]string) ([]*storage.FileInfo, error)); ok {
		return rf(ctx, fileId, keys)
	}
	if rf, ok := ret.Get(0).(func(context.Context, domain.FullFileId, map[string]string) []*storage.FileInfo); ok {
		r0 = rf(ctx, fileId, keys)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*storage.FileInfo)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, domain.FullFileId, map[string]string) error); ok {
		r1 = rf(ctx, fileId, keys)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// GetFileVariants is a helper method to define mock.On call
//   - ctx context.Context
//   - fileId domain.FullFileId
//   - keys map[string]string
func (_e *MockService_Expecter) GetFileVariants(ctx interface{}, fileId interface{}, keys interface{}) *MockService_GetFileVariants_Call {
	return &MockService_GetFileVariants_Call{Call: _e.mock.On("GetFileVariants", ctx, fileId, keys)}
}

func (_c *MockService_GetFileVariants_Call) Run(run func(ctx context.Context, fileId domain.FullFileId, keys map[string]string)) *MockService_GetFileVariants_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(domain.FullFileId), args[2].(map[string]string))
	})
	return _c
}

func (_c *MockService_GetFileVariants_Call) Return(_a0 []*storage.FileInfo, _a1 error) *MockService_GetFileVariants_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_GetFileVariants_Call) RunAndReturn(run func(context.Context, domain.FullFileId, map[string]string) ([]*storage.FileInfo, error)) *MockService_GetFileVariants_Call {
	_c.Call.Return(run)
	return _c
}

// ImageAdd provides a mock function with given fields: ctx, spaceID, options
func (_m *MockService) ImageAdd(ctx context.Context, spaceID string, options ...files.AddOption) (*files.AddResult, error) {
	_va := make([]interface{}, len(options))
	for _i := range options {
		_va[_i] = options[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, spaceID)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 *files.AddResult
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, ...files.AddOption) (*files.AddResult, error)); ok {
		return rf(ctx, spaceID, options...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, ...files.AddOption) *files.AddResult); ok {
		r0 = rf(ctx, spaceID, options...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*files.AddResult)
		}
	}

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

	return r0, r1
}

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

// ImageAdd is a helper method to define mock.On call
//   - ctx context.Context
//   - spaceID string
//   - options ...files.AddOption
func (_e *MockService_Expecter) ImageAdd(ctx interface{}, spaceID interface{}, options ...interface{}) *MockService_ImageAdd_Call {
	return &MockService_ImageAdd_Call{Call: _e.mock.On("ImageAdd",
		append([]interface{}{ctx, spaceID}, options...)...)}
}

func (_c *MockService_ImageAdd_Call) Run(run func(ctx context.Context, spaceID string, options ...files.AddOption)) *MockService_ImageAdd_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]files.AddOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(files.AddOption)
			}
		}
		run(args[0].(context.Context), args[1].(string), variadicArgs...)
	})
	return _c
}

func (_c *MockService_ImageAdd_Call) Return(_a0 *files.AddResult, _a1 error) *MockService_ImageAdd_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockService_ImageAdd_Call) RunAndReturn(run func(context.Context, string, ...files.AddOption) (*files.AddResult, error)) *MockService_ImageAdd_Call {
	_c.Call.Return(run)
	return _c
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	return mock
}
