// Code generated by mockery. DO NOT EDIT.

package file

import (
	fileuploader "github.com/anyproto/anytype-heart/core/files/fileuploader"
	mock "github.com/stretchr/testify/mock"

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

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

	pb "github.com/anyproto/anytype-heart/pb"

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

	simplefile "github.com/anyproto/anytype-heart/core/block/simple/file"

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

// MockFile is an autogenerated mock type for the File type
type MockFile struct {
	mock.Mock
}

type MockFile_Expecter struct {
	mock *mock.Mock
}

func (_m *MockFile) EXPECT() *MockFile_Expecter {
	return &MockFile_Expecter{mock: &_m.Mock}
}

// CreateAndUpload provides a mock function with given fields: ctx, req
func (_m *MockFile) CreateAndUpload(ctx session.Context, req pb.RpcBlockFileCreateAndUploadRequest) (string, error) {
	ret := _m.Called(ctx, req)

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

	var r0 string
	var r1 error
	if rf, ok := ret.Get(0).(func(session.Context, pb.RpcBlockFileCreateAndUploadRequest) (string, error)); ok {
		return rf(ctx, req)
	}
	if rf, ok := ret.Get(0).(func(session.Context, pb.RpcBlockFileCreateAndUploadRequest) string); ok {
		r0 = rf(ctx, req)
	} else {
		r0 = ret.Get(0).(string)
	}

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

	return r0, r1
}

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

// CreateAndUpload is a helper method to define mock.On call
//   - ctx session.Context
//   - req pb.RpcBlockFileCreateAndUploadRequest
func (_e *MockFile_Expecter) CreateAndUpload(ctx interface{}, req interface{}) *MockFile_CreateAndUpload_Call {
	return &MockFile_CreateAndUpload_Call{Call: _e.mock.On("CreateAndUpload", ctx, req)}
}

func (_c *MockFile_CreateAndUpload_Call) Run(run func(ctx session.Context, req pb.RpcBlockFileCreateAndUploadRequest)) *MockFile_CreateAndUpload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(session.Context), args[1].(pb.RpcBlockFileCreateAndUploadRequest))
	})
	return _c
}

func (_c *MockFile_CreateAndUpload_Call) Return(_a0 string, _a1 error) *MockFile_CreateAndUpload_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockFile_CreateAndUpload_Call) RunAndReturn(run func(session.Context, pb.RpcBlockFileCreateAndUploadRequest) (string, error)) *MockFile_CreateAndUpload_Call {
	_c.Call.Return(run)
	return _c
}

// DropFiles provides a mock function with given fields: req
func (_m *MockFile) DropFiles(req pb.RpcFileDropRequest) error {
	ret := _m.Called(req)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(pb.RpcFileDropRequest) error); ok {
		r0 = rf(req)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// DropFiles is a helper method to define mock.On call
//   - req pb.RpcFileDropRequest
func (_e *MockFile_Expecter) DropFiles(req interface{}) *MockFile_DropFiles_Call {
	return &MockFile_DropFiles_Call{Call: _e.mock.On("DropFiles", req)}
}

func (_c *MockFile_DropFiles_Call) Run(run func(req pb.RpcFileDropRequest)) *MockFile_DropFiles_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(pb.RpcFileDropRequest))
	})
	return _c
}

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

func (_c *MockFile_DropFiles_Call) RunAndReturn(run func(pb.RpcFileDropRequest) error) *MockFile_DropFiles_Call {
	_c.Call.Return(run)
	return _c
}

// SetFileStyle provides a mock function with given fields: ctx, style, blockIds
func (_m *MockFile) SetFileStyle(ctx session.Context, style model.BlockContentFileStyle, blockIds ...string) error {
	_va := make([]interface{}, len(blockIds))
	for _i := range blockIds {
		_va[_i] = blockIds[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, style)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(session.Context, model.BlockContentFileStyle, ...string) error); ok {
		r0 = rf(ctx, style, blockIds...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// SetFileStyle is a helper method to define mock.On call
//   - ctx session.Context
//   - style model.BlockContentFileStyle
//   - blockIds ...string
func (_e *MockFile_Expecter) SetFileStyle(ctx interface{}, style interface{}, blockIds ...interface{}) *MockFile_SetFileStyle_Call {
	return &MockFile_SetFileStyle_Call{Call: _e.mock.On("SetFileStyle",
		append([]interface{}{ctx, style}, blockIds...)...)}
}

func (_c *MockFile_SetFileStyle_Call) Run(run func(ctx session.Context, style model.BlockContentFileStyle, blockIds ...string)) *MockFile_SetFileStyle_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]string, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(string)
			}
		}
		run(args[0].(session.Context), args[1].(model.BlockContentFileStyle), variadicArgs...)
	})
	return _c
}

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

func (_c *MockFile_SetFileStyle_Call) RunAndReturn(run func(session.Context, model.BlockContentFileStyle, ...string) error) *MockFile_SetFileStyle_Call {
	_c.Call.Return(run)
	return _c
}

// SetFileTargetObjectId provides a mock function with given fields: ctx, blockId, targetObjectId
func (_m *MockFile) SetFileTargetObjectId(ctx session.Context, blockId string, targetObjectId string) error {
	ret := _m.Called(ctx, blockId, targetObjectId)

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

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

	return r0
}

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

// SetFileTargetObjectId is a helper method to define mock.On call
//   - ctx session.Context
//   - blockId string
//   - targetObjectId string
func (_e *MockFile_Expecter) SetFileTargetObjectId(ctx interface{}, blockId interface{}, targetObjectId interface{}) *MockFile_SetFileTargetObjectId_Call {
	return &MockFile_SetFileTargetObjectId_Call{Call: _e.mock.On("SetFileTargetObjectId", ctx, blockId, targetObjectId)}
}

func (_c *MockFile_SetFileTargetObjectId_Call) Run(run func(ctx session.Context, blockId string, targetObjectId string)) *MockFile_SetFileTargetObjectId_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(session.Context), args[1].(string), args[2].(string))
	})
	return _c
}

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

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

// UpdateFile provides a mock function with given fields: id, groupId, apply
func (_m *MockFile) UpdateFile(id string, groupId string, apply func(simplefile.Block) error) error {
	ret := _m.Called(id, groupId, apply)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(string, string, func(simplefile.Block) error) error); ok {
		r0 = rf(id, groupId, apply)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// UpdateFile is a helper method to define mock.On call
//   - id string
//   - groupId string
//   - apply func(simplefile.Block) error
func (_e *MockFile_Expecter) UpdateFile(id interface{}, groupId interface{}, apply interface{}) *MockFile_UpdateFile_Call {
	return &MockFile_UpdateFile_Call{Call: _e.mock.On("UpdateFile", id, groupId, apply)}
}

func (_c *MockFile_UpdateFile_Call) Run(run func(id string, groupId string, apply func(simplefile.Block) error)) *MockFile_UpdateFile_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string), args[2].(func(simplefile.Block) error))
	})
	return _c
}

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

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

// Upload provides a mock function with given fields: ctx, id, source, isSync
func (_m *MockFile) Upload(ctx session.Context, id string, source FileSource, isSync bool) (string, error) {
	ret := _m.Called(ctx, id, source, isSync)

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

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

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

	return r0, r1
}

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

// Upload is a helper method to define mock.On call
//   - ctx session.Context
//   - id string
//   - source FileSource
//   - isSync bool
func (_e *MockFile_Expecter) Upload(ctx interface{}, id interface{}, source interface{}, isSync interface{}) *MockFile_Upload_Call {
	return &MockFile_Upload_Call{Call: _e.mock.On("Upload", ctx, id, source, isSync)}
}

func (_c *MockFile_Upload_Call) Run(run func(ctx session.Context, id string, source FileSource, isSync bool)) *MockFile_Upload_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(session.Context), args[1].(string), args[2].(FileSource), args[3].(bool))
	})
	return _c
}

func (_c *MockFile_Upload_Call) Return(fileObjectId string, err error) *MockFile_Upload_Call {
	_c.Call.Return(fileObjectId, err)
	return _c
}

func (_c *MockFile_Upload_Call) RunAndReturn(run func(session.Context, string, FileSource, bool) (string, error)) *MockFile_Upload_Call {
	_c.Call.Return(run)
	return _c
}

// UploadState provides a mock function with given fields: ctx, s, id, source, isSync
func (_m *MockFile) UploadState(ctx session.Context, s *state.State, id string, source FileSource, isSync bool) error {
	ret := _m.Called(ctx, s, id, source, isSync)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(session.Context, *state.State, string, FileSource, bool) error); ok {
		r0 = rf(ctx, s, id, source, isSync)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// UploadState is a helper method to define mock.On call
//   - ctx session.Context
//   - s *state.State
//   - id string
//   - source FileSource
//   - isSync bool
func (_e *MockFile_Expecter) UploadState(ctx interface{}, s interface{}, id interface{}, source interface{}, isSync interface{}) *MockFile_UploadState_Call {
	return &MockFile_UploadState_Call{Call: _e.mock.On("UploadState", ctx, s, id, source, isSync)}
}

func (_c *MockFile_UploadState_Call) Run(run func(ctx session.Context, s *state.State, id string, source FileSource, isSync bool)) *MockFile_UploadState_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(session.Context), args[1].(*state.State), args[2].(string), args[3].(FileSource), args[4].(bool))
	})
	return _c
}

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

func (_c *MockFile_UploadState_Call) RunAndReturn(run func(session.Context, *state.State, string, FileSource, bool) error) *MockFile_UploadState_Call {
	_c.Call.Return(run)
	return _c
}

// dropFilesCreateStructure provides a mock function with given fields: groupId, targetId, pos, entries
func (_m *MockFile) dropFilesCreateStructure(groupId string, targetId string, pos model.BlockPosition, entries []*dropFileEntry) ([]string, error) {
	ret := _m.Called(groupId, targetId, pos, entries)

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

	var r0 []string
	var r1 error
	if rf, ok := ret.Get(0).(func(string, string, model.BlockPosition, []*dropFileEntry) ([]string, error)); ok {
		return rf(groupId, targetId, pos, entries)
	}
	if rf, ok := ret.Get(0).(func(string, string, model.BlockPosition, []*dropFileEntry) []string); ok {
		r0 = rf(groupId, targetId, pos, entries)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	if rf, ok := ret.Get(1).(func(string, string, model.BlockPosition, []*dropFileEntry) error); ok {
		r1 = rf(groupId, targetId, pos, entries)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// dropFilesCreateStructure is a helper method to define mock.On call
//   - groupId string
//   - targetId string
//   - pos model.BlockPosition
//   - entries []*dropFileEntry
func (_e *MockFile_Expecter) dropFilesCreateStructure(groupId interface{}, targetId interface{}, pos interface{}, entries interface{}) *MockFile_dropFilesCreateStructure_Call {
	return &MockFile_dropFilesCreateStructure_Call{Call: _e.mock.On("dropFilesCreateStructure", groupId, targetId, pos, entries)}
}

func (_c *MockFile_dropFilesCreateStructure_Call) Run(run func(groupId string, targetId string, pos model.BlockPosition, entries []*dropFileEntry)) *MockFile_dropFilesCreateStructure_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string), args[2].(model.BlockPosition), args[3].([]*dropFileEntry))
	})
	return _c
}

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

func (_c *MockFile_dropFilesCreateStructure_Call) RunAndReturn(run func(string, string, model.BlockPosition, []*dropFileEntry) ([]string, error)) *MockFile_dropFilesCreateStructure_Call {
	_c.Call.Return(run)
	return _c
}

// dropFilesSetInfo provides a mock function with given fields: info
func (_m *MockFile) dropFilesSetInfo(info dropFileInfo) error {
	ret := _m.Called(info)

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

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

	return r0
}

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

// dropFilesSetInfo is a helper method to define mock.On call
//   - info dropFileInfo
func (_e *MockFile_Expecter) dropFilesSetInfo(info interface{}) *MockFile_dropFilesSetInfo_Call {
	return &MockFile_dropFilesSetInfo_Call{Call: _e.mock.On("dropFilesSetInfo", info)}
}

func (_c *MockFile_dropFilesSetInfo_Call) Run(run func(info dropFileInfo)) *MockFile_dropFilesSetInfo_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(dropFileInfo))
	})
	return _c
}

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

func (_c *MockFile_dropFilesSetInfo_Call) RunAndReturn(run func(dropFileInfo) error) *MockFile_dropFilesSetInfo_Call {
	_c.Call.Return(run)
	return _c
}

// newUploader provides a mock function with given fields: origin
func (_m *MockFile) newUploader(origin objectorigin.ObjectOrigin) fileuploader.Uploader {
	ret := _m.Called(origin)

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

	var r0 fileuploader.Uploader
	if rf, ok := ret.Get(0).(func(objectorigin.ObjectOrigin) fileuploader.Uploader); ok {
		r0 = rf(origin)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(fileuploader.Uploader)
		}
	}

	return r0
}

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

// newUploader is a helper method to define mock.On call
//   - origin objectorigin.ObjectOrigin
func (_e *MockFile_Expecter) newUploader(origin interface{}) *MockFile_newUploader_Call {
	return &MockFile_newUploader_Call{Call: _e.mock.On("newUploader", origin)}
}

func (_c *MockFile_newUploader_Call) Run(run func(origin objectorigin.ObjectOrigin)) *MockFile_newUploader_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(objectorigin.ObjectOrigin))
	})
	return _c
}

func (_c *MockFile_newUploader_Call) Return(_a0 fileuploader.Uploader) *MockFile_newUploader_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *MockFile_newUploader_Call) RunAndReturn(run func(objectorigin.ObjectOrigin) fileuploader.Uploader) *MockFile_newUploader_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
